The 500 Internal server
error is not WordPress specific and it can happen with any other website
you host with any web server. There are number of reasons why this
error can occur. Its generic nature makes it annoying to fix. It won't
show the actual error in browser so you can get it fixed. To check actual errors in Linux based servers,
you will have to dig the server logs for exact cause of 500 error. We
have compiled all possible causes of the 500 Internal Server errors in
WordPress along with troubleshooting steps:
Corrupt .htaccess File
If your .htaccess
file is corrupt and it can cause a 500 Internal server error. In this
case, first you will have to access .htaccess file either through FTP or
through cPanel file manager and rename it. Here are the steps you can
refer to rename the .htaccess file.
- After login at cPanel, under Files section, select the File Manager icon.
- Check the box for Document Root for and select the domain name you wish to access from the drop-down menu.
- Make sure "Show Hidden Files (dotfiles)" is checked and Click on Go.
- In a new tab, File Manager will open. Locate .htaccess file in the list of all files.
- Right click on the .htaccess file and Rename it like .htaccess.older.
Creating new .htaccess- Log into WordPress dashboard.
- From the left-hand navigation menu, Click on Settings > Permalinks
- Click the Save Settings button and try reloading your website.
If renaming .htaccess file does not resolve your problem, continue reading this article.
Memory Exhausted
This error also occurs if your WordPress website exhausts the memory
limit. It could be a poorly coded plugins or a theme that is exhausting
your memory limit. To fix this, you will have to increase the memory
limit in WordPress. Open
wp-config.php file located under the root
WordPress directory. Add following line in
wp-config.php and save the file.
define('WP_MEMORY_LIMIT', '128M');
If you still get this error after this fix, you will have to extend the PHP Memory limit from php.ini file. You can contact your web host to increase the PHP Memory limit.
Culprit pluginsIf the PHP memory limit increase does not fix your 500 Internal Server error, it is more likely being caused by a one or more plugins installed on WordPress.
It is quite often that when new plugin is installed, a previously
installed plugins are not comfortable with it which is resulting in a
500 Internal Server error. In other cases, a combination of certain plugins or themes are not compatible with each other and hence ending in 500 error.
Unfortunately, there is no straight
way we can determine the exact problematic plugin. Hence, to filter down
plugin specific issues you will have to deactivate all WordPress
plugins at once. Refer the following steps to deactivate all WordPress
plugins without WordPress dashboard.
Deactivating all plugins through cPanel- Login at cPanel, Under Files section, Go to File Manager.
- Select Web Root (public_html/www) and click Go.
- Expand the public_html folder, and navigate to the /wp-content/plugins folder.
- Right click on the /wp-content/plugins folder and rename it like plugins.old. This will deactivate all of the plugins at once.
- Now, reactivate plugins folder again by renaming back to plugins. This will allow you to access to the WordPress Dashboard again.
- At WordPress Dashboard, reactivate each plugin (one at a time) and reload your website to see if the 500 error is fixed.
By this method, you can determine the offending plugin and isolate it to resolve the 500 Internal Server Error.
Re-uploading Core Files
If disabling plugin do not fix the internal server error, then only option you are left with is to re-uploading the
wp-admin and
wp-includes folder from a fresh WordPress install. Download Fresh
WordPress installation and locate and
wp-admin and
wp-includes
folders and replace them at web server. Do not worry, it won't remove
any of your WordPress data but it will fix any file corruption issues.