WordPress White Screen of Death

WordPress is one of the most popular website creation tools on the Internet, and it has a massive number of third-party plugins and themes that you can easily install. This large ecosystem can also be the cause of the most frustrating problems you can have with WordPress – the White Screen of Death.

This is often caused when you update WordPress and the new version isn’t compatible with an older plugin or theme. Or perhaps a plugin or theme has been updated and the new version is either buggy, or not compatible with your installed version of WordPress.

In this article I will go through some of the ways you can fix problems like this, even if you can’t get into the WordPress admin panel.

Disable plugins and themes

Often you will know which plugin or theme has caused the problem, because it will be the last one you updated. You can easily disable a plugin from the WordPress Admin by going to the Plugins page and clicking the Deactivate link:

If the WordPress Admin page doesn’t work then you can still disable plugins by renaming the plugin folder, either using FTP or from your hosts control panel file manager. Plugins are stored in the ‘wp-content/plugins’ folder. So to disable the plugin just append ‘.bak’ to the folder name and try reloading the site. Once you know which plugin caused the problem you can perhaps go back to an older version to get your site working, or get in touch with the vendor to see if they are aware of any issues.

Showing the error

It helps to know what error you are getting from PHP as this will probably tell you why the site doesn’t work. Most production web servers hide PHP errors for security reasons, so to let you see what error you are getting add the following line to the site’s index.php (after the <?php line):

ini_set('display_errors', 1);

If you reload the site homepage you should see an error like:

Parse error: syntax error, unexpected ‘echo’ (T_ECHO) in /…/wp-content/plugins/akismet/akismet.php on line 36

This will hopefully give you a good indication of which plugin is failing and maybe even tell you why. Don’t forget to remove the line once you’ve fixed the problem.

PHP version issues

Currently (as of Feb 2019) the recommended version of PHP is version 7.3, but WordPress itself will work with PHP version 5.2 and above. This can often mean that you may be running an old version of PHP on your webserver, and that has worked until you come to upgrade a plugin which requires a newer version of PHP. Hopefully adding the ‘ini_set’ line has given you an error message that helps; if it mentions ‘deprecated’ then it is quite likely to be a version issue. Upgrading the PHP version might fix this issue. How you do this will depend on your webhost, but all hosts now should at least support PHP up to version 7.0 so trying that may fix the problem.

For security reasons you should always try to run the most up to date version of PHP that you can.