How to Fix WordPress 500 Internal Server Error
Those who are using WordPress for years know why they are getting 500 internal server error and how they can get rid of it. However, this error always irks those who are new to the WordPress. There is no need to panic. Your blog is not gone for good or your WordPress website is not in the control of a bad guy. It is one of the common WordPress errors users have to deal with. Just like other errors, it is also fixable if its cause is known. Therefore, whenever you encounter 500 internal server or any other WordPress error; first of all stop worrying and dig for the cause of the error.
The first and foremost thing you should do whenever you encounter any error in the WordPress is enabling debug mode. It is helpful in finding the actual cause of an error. All you need to do is add following code at the bottom of wp-config.php:
Causes of 500 Internal Server Error
One thing you should always remember that WordPress is not always responsible for this error. Any other issue on the server side can cause this error. The objective of this post is to enlighten WordPress users about issues in the WordPress causing 500 internal server error. This error may arise due to a theme or plugin. Apart from these two, an error in the .htaccess file and memory exhaustion are also the possible causes of this error. Here at Templatetoaster WordPress theme builder and WordPress website builder, let’s walk through these causes in detail and learn how to fix this error if caused due to WordPress.
500 internal server error may appear on your screen due to an incompatible plugin. Maybe, you have activated a plugin not compatible with PHP and/or WordPress version. It is easy to fix if you have activated only one plugin before the appearance of this error message. There might be a case in which you have activated more than one plugin. In that case, you have to identify the troubling plugin/plugins. Here is how you can identify the broken plugin and fix this error.
How to Fix
If you are getting this error after activation of one plugin then deactivate that plugin and reload your website. If you have activated more than one plugin then deactivate all plugins. Now, this can be done using the WordPress dashboard. There might be a case in which you cannot access the dashboard. Here you can use FTP or cPanel to navigate to the ‘plugins’ folder in the wp-content folder. Now rename the ‘plugins’ folder (say plugins_old). This will deactivate all plugins all together. Now change the name of the folder back to ‘plugins’. Reload your website after activating all plugins one by one. The activation of the culprit plugin will cause the return of the error. Now, rename the folder containing all files of that plugin to deactivate it. Reload your website and check if the error is gone or not. If not, there is some other cause of this error.
If this error message is still there on the screen, the activated theme can be the troublemaker. The theme might be outdated or its back end code might have been changed.
How to Fix
In case the admin area is accessible, switch to the default theme. If the admin area is not accessible then make use of an FTP client or cPanel. Now, open the ‘themes’ folder and rename the folder containing all files associated with the activated theme. This will deactivate the current theme and the default theme will be automatically activated. Reload the website. If you still see that error message, nothing is wrong with the theme.
Corrupted .htaccess File
.htaccess file is a file configured at the directory level. Apache based servers use this file to control the directory in which it resides and also other files and subdirectories in that directory. A corrupted .htaccess file is also one of the causes of 500 internal server error.
How to Fix
If the error is because of .htaccess file, rename it to .htaccess_xyz. This file can be found in the directory containing wp-content, wp-admin and wp-includes folders. After you rename this file, reload your website and check if the error is resolved or not. If resolved, then you have to generate a new .htaccess file otherwise your website will return 404 error. For generating a new .htaccess file, go to Setting, select Permalinks and click on Save Changes button.
Exhausted PHP Memory Limits
WordPress requires a certain amount of memory to work which if it does not get, it might return 500 internal server error. Plugins, scripts and themes often occupy too much memory.
How to Fix
In case this error is coming because of PHP memory limits, then you have to increase the memory limits. Increasing PHP memory limits is not a difficult job. All you need to do is to add following line of code in the wp-config.php file:
However, first of all, for this you need to access the wp-config.php file. This file can be accessed either via FTP or cPanel. Save changes and reload your website.
Corrupted Core Files
You have to deal with this error if one of the core files of the WordPress is corrupted. Many times, we need to add some code snippets in these core files. The user may commit a syntax error while adding the code snippet.
How to Fix
If you are getting this error due to corrupted core files then you need to re-upload a fresh version of wp-admin and wp-includes folders from a new WordPress installation. As the wp-content folder remains untouched, you are not going to lose your data.
There are many other software and systems employed in the server side. Any issue in these software and systems can cause the 500 internal server error. Information in this post can help you in troubleshooting this error if caused due to WordPress. After trying everything, if you are still getting this error then immediately get in touch with your service provider. Share this post and feel free to write your reviews. If you have encountered this error and fixed it in some other way then share it with us. It will be helpful for us and our readers.
Design themes that make your websites stand apart from the rest. Get your dynamic Drag and Drop Theme Builder Software today.Download Now