Fixing WordPress Internal Server Errors
The Internal Server Error (also known as the 500 Internal Server Error) is one of the most confusing errors in WordPress. It occurs without any clear cause, making it challenging to resolve and often requiring extensive troubleshooting. Common causes of this error include a corrupted .htaccess file, an exhausted PHP memory limit, faulty plugins, corrupted core files, and incorrect file permissions.
Below are possible solutions to help you resolve the Internal Server Error and get your WordPress site back up and running.
IMPORTANT:
The solutions given below require changes in your website files. Before making any changes, we strongly recommend backing up your website files.
Solutions to Fix Internal Server Error
Check for a corrupted .htaccess file
- Access your File Manager.
- Go to the public_html folder and locate your .htacccess file.
- Right-click the .htaccess file and select Rename (or click the Rename button at the top of the page).
- Rename the file as you wish (For example: .htaccess_old).
- Open a browser and enter your domain to check if your site is running.
- If the error is gone, create a new .htaccess file:
a. Clicking the + File button at the top left side of the page.
b. Name the file .htaccess.
c. Click Create New File.
If the error remains, proceed to the next solution.
Increase PHP memory limit
Internal Server Errors can occur if the PHP memory limit set by your hosting provider is exhausted. To check if this is causing the error, increase the PHP memory limit. Follow the steps in this guide: How To Increase PHP Memory Limit
Deactivate plugins
As mentioned, faulty plugins may cause an error. To check, follow the steps below:
- Access your File Manager.
- Go to public_html folder and look for the wp-content folder. Double click on the folder to open it.
- Right-click the plugins folder, and select Rename.
- Rename the plugins folder (For example: plugins_old). This will deactivate all of your plugins.
- Check if the site works.
- If the site works, rename the folder back to its original name: plugins
- Open the plugins folder and rename each plugin folder one by one, checking the site after each change to identify the faulty plugin. Do not forget to change the file name back to original name again when you find a specific plugin is not causing the error.
- Once you find the plugin that's causing the issue, deactivate the plugin.
If the issue is caused by a plugin, then it should be fixed by now. If not, continue reading.
Check file permissions
Though unlikely, checking file permissions is worth a try. Changing permissions can cause several errors, including an Internal Server Error. To check, follow the steps below.
- Access your File Manager.
- Go to the public_html folder and locate your .htacccess file.
- Under the Permissions column, check if permissions for your .htaccess file are set to 755 or 644.
- If not, change the file permission by double-clicking the permission number and changing it to 755 or 644.
- Click Save.
- Open a browser and check if your site is running.
Upload latest version of core files
If the above solutions haven't resolved the issue, re-uploading the core files (wp-admin and wp-includes) can be a last resort. Below are two ways for re-uploading these files.
IMPORTANT:
Make sure to create a back up of your website before proceeding.
Via FTP client
For your convenience, using an FTP client is recommended:
- Download the latest version of WordPress to your computer.
- Double-click the zip file downloaded and extract it.
- Access your FTP Client, and enter the following in the necessary fields:
- Hostname: ftp.yourdomain.com
- Username: Your hosting username
- Password: Your hosting password
- Port: 21
- Once logged in, go to public_html.
- Upload the wp-admin and wp-includes folders, overwriting the old core files. If it is for an Add-on domain or a Subdomain, upload it to the corresponding folder given for such domain.
- After uploading, open a browser and check if your site is running.
Via cPanel File Manager
Alternatively, you can use the File Manager in cPanel:
- Download the latest version of WordPress to your computer.
- Double-click the zip file downloaded and extract it.
- Access your File Manager.
- Go to the public_html folder.
- On the upper part of the screen, click Upload.
- On the next screen, click Choose File and upload either wp-admin or wp-includes, whichever you prefer to upload first.
- Overwrite old core files, then upload the remaining files.
- Open a browser and check if your site is running.
To prevent a 500 internal server error from occurring again, we recommend regularly backing up your site and promptly updating your plugins, themes, and core files as soon as updates become available.