This incident occurred last night, so i thought it would be nice to write a post about the internal server error, also known as the WordPress white screen of death.
Obviously, i resolved the problem so it would be useful to have a how-to post in order to have the instructions handy in case it happens again in the future.
There are a few reasons why this problem can occur. Some users report that they can only login to the admin area aka the dashboard, while others (like me) report that their site appears to be completely wasted.
However, this is not totally true as long as you are patient, willing and capable to modify some stuff by yourself.
There are a few suggestions presented below and let’s hope that your site will be back live and kicking before you reach the end of that list. Although the order is not absolute, i would suggest to try the first step and then proceed as you like. Remember after each step to check if the internal server error persists. Also, remember to take a full backup just in case you decide to give up and install WordPress again.
Delete all .htaccess files
When you access your hosting account, locate and delete( or rename) all the .htaccess files that are associated with the problematic WordPress installation.
After that if admin area is active again, visit the Permalinks under Settings and press save in order to regenerate the correct .htaccess files again. If the problem perists, go to the next step
Increase php memory limit
First of all create a file inside your webserver let’s say test.php and inside it put these lines
[php][/php] Visit the file test.php to see the output of the php configuration and locate the memory_limit line.
Create a php.ini file if you don’t have access to your server’s php.ini file and paste this code
memory_limit = 128M ; //the value depends on the output of test.php //meaning you should enter something more than the output.
save the file and upload it into your /wp-admin/ folder.
Alternatively, open your wp-config.php file and add the code below.
define('WP_MEMORY_LIMIT', '128M');
If you do have access to your server’s php.ini file, first locate memory_limit = 128M ; and then increase the value.
Don’t forget to restart your webserver after such modification, for the changes to take effect.
Plugin de-activation
There is a possibility that if a plugin contains an error, can cause such a disaster.
If you can’t access the dashboard, you can still de-activate all the plugins from the database.
You can either pass an SQL statement in phpMyAdmin or manually edit the value of active_plugins. Go to phpMyAdmin locate your WP database and browse prefix_options table. There you should change the value of active_plugins to a:0:{}.
After that if you can access the dashboard try reactivating each plugin one by one to see if the problem re-occurs.
If that is the case you can also send the plugin author a feedback to solve the problem, or even fix it yourself.
Theme functions.php contains an error
This is the place where errors are frequent. Especially, when we are talking about a Child Theme. A custom function can cause the error even by mistake so switching to a more default theme like twentyfourteen or to a theme that you haven’t modified can solve the problem.
Go to phpMyAdmin again locate your WP database and browse (wp)_options table. There you should change the value of template and stylesheet to twentyfourteen.
Upload a fresh copy of wp-admin and wp-includes folders
There is also a possibility although not tested, that a fresh copy of wp-admin and wp-includes folders, can solve the problem. You can always get these fresh copies from a fresh install of WordPress.
Before trying this though, i would suggest you to take a backup of your site and database just in case.
Internal Server Error 500 – Conclusion
The internal server error is not a reason to panic,so keep your fingers crossed, test, try and you should get it working again.
Leave a Reply