Anyone who has run Windows for a long enough must have faced the Blue Screen of Death many times. It is a heart sinking feeling. For WordPress bloggers, it is the White Screen of Death. In some sense, it is more annoying than the BSOD. At least, with a computer you can have a low-level formatting and start afresh. WordPress White Screen of Death (WSOD) locks you out of the admin panel, which shall make anyone feel helpless. Moreover, there is no diagnostic details, to let you know what exactly is wrong. In some cases, it might happen that only certain parts of the blog get affected by the WSOD, while other parts are normal.
Reasons for WSOD
The problem with WordPress WSOD is that there are a number of things which can go wrong. The most frequent problem is due to exceeding the memory limit. This problem may be caused by a new plugin which you have started using, or a newly installed theme. Most of the times, the problem is with the newly made changes. While, the actual troubleshooting might take a lengthy investigation, to avoid any concerns, always backup your data before installing any new plugins or themes.
In this post, we shall discuss ways to fix WordPress white screen of death issue.
Increase PHP Memory Limit
Like it was mentioned, the most common problem is exceeding PHP memory limit. It can be eliminated by increasing the PHP memory. The process is not very convoluted. If you are lucky, the problem would be solved with this. Otherwise, continue to the next steps. If you don't know how, here is a pretty good tutorials about how to increase PHP memory limit. Before making change, please make sure your WordPress hosting solution would allow you to increase PHP memory_limit.
Check if the Problem Occurs in Multiple Sites
If you have more than one WordPress site hosted on a server, and all of them are showing WSOD problem, it is highly probable that the problem might be with the web server. Contact the web hosts to sort out the issue. However, if only certain sites, or only one site is showing the problem, then the problem might be related to some plugin which you recently installed, or may be the theme. This diagnosis shall help you narrow down the scope problem.
If the problem is local to your site, there is a need to start some real troubleshooting. Like it has been mentioned few times earlier, the chief sources of problems are the plugins or themes. So, start tweaking them.
Disable All the Plugins
If the problem still exists after increasing PHP memory limit, then the culprit might be a bug-ridden plugin. Deactivate all the plugins, and see if the WSOD is resolved. If the issue gets resolved, then start enabling one plugin at one time, and see which one actually brings the site down. With enough luck, you shall get the problematic plugin soon.
If the problem is not solved by simply disabling the plugins, the next stop would be to disable themes.
Change to Default Theme
The white screen of death may also be the result of a badly coded theme. To check this, switch back to the default WordPress theme. The simplest way to do this is to store your backup theme somewhere, and then deleting it. WordPress will change to the default theme.
Another way will be to do this with phpMyAdmin. Update the database table in ‘wp_options’. Update the template, stylesheets, and current_theme values to ‘twentyeleven’.
If you resolve the issue with this, then check your theme’s ‘function.php’. It may happen that there are badly coded functions in there, or presence of undesirable spaces at the end of PHP file might create the problem.
This is the last fix, and should be executed after you are sure that a simple plugin or a faulty theme aren’t the culprits. It may sometimes happen that the core WordPress files might get corrupted. Like an OS, the fix is to reinstall WordPress.
Using WordPress Debug Function
To enable debug function in WordPress, add
error_reporting(E_ALL); ini_set('display_errors', 1);
define( 'WP_DEBUG', true);
to wp-config.php. After doing this, the white screen shall show details regarding the error, which might help in sorting out the problem.
It may sometimes happen that you can access the admin dashboard, but the frontend has the WSOD. In such situations, try emptying the cache.
If you see the WSOD only for long posts, then also try clearing the cache. You can also consider raising the value of recursion or backend limit. To do this, add the below code:
in your php.ini file.
The white screen of death is a one of the most frustrating errors that you will ever encounter. Have patience, and try these solutions for the problem.