Joomla & WordPress Tutorials, Info, Discussion, Tips | GavickPro Blog

The WordPress White Screen of Death

If you’re a WordPress user (and let’s face it, if you’re reading this you probably are!) then you’ve likely run into this situation before; you jump in your backend, make a few modifications, install a plugin or theme or two, then when you open your frontpage to see what damage your handiwork has had you’re instead confronted with a blank white screen (of DEATH!). You’ve become the latest victim of the WordPress White Screen.

Your first reaction might be to get frustrated and kick your computer, but this won’t do any good; you need to kick your server and that’s probably miles away and they don’t make shoes that big. Instead, take a breath and don’t panic, as in this article I’ll share a few solutions that just might help you get back up to speed.

Before we begin, I’ll share the biggest tip of all; before you start making any changes to your site, make sure to do a full backup of your files and database. This way, if the worse should happen and your changes completely break your site, you’ll still have somewhere to fall back to.

Enable WordPress debug mode

On those occasions where I encounter the white screen, the first thing that I’ll try is enabling the debug mode in WordPress. To do this, you have to connect to your website’s server via FTP and navigate to the root directory of your WordPress site. Here, you’ll find a file called wp-config.php; open this with your editor of choice and change the following line:

define('WP_DEBUG', false);

into:

define('WP_DEBUG', true);

Save the changes to the file and refresh your website; this should replace the white screen of death with some information about the source of the error and what’s causing it; This article should help you get an idea of how the debug mode works. As with many technical error reports the PHP errors or warnings will be difficult to understand for a beginner or someone with less technical experience, but this doesn’t mean that the debug mode is useless for a beginner. As well as the details of the error, the information provided by the debug mode also points to the file where the issue originates, which can be very helpful for some basic fixes. For example, the problem file may be from a plugin you’ve installed, so it’s likely enough to just disable the plugin and your site will be up and running again.

If you are an advanced user, you should also check your server error logs which will give you additional information about the error.

Check your plugins

For the average user, plugins are the most common cause for your WordPress site white-screening, so they should be one of your first ports of call when hunting for a solution. If you've recently installed and activated a plugin and encounter the white screen, then disabling the plugin in question will likely solve the issue. This may even apply some time after the plugin was installed, so even if you’ve been able to use the site after the activating a plugin before seeing the white screen it’s still a good idea to check your plugins just in case. When it comes to disabling the plugin, if you’ve still got access to your dashboard then disabling the plugin is simple; just navigate to your Dashboard’s plugin section and deactivate the plugin. If you’re not sure which plugin is the culprit, you can try deactivating the plugins one by one, or all of them at once, to see if this fixes the issue. Then, re-enable them one-by-one to find the one causing the problem..

If you dont' have access to your dashboard you’ll have to use a more rough method to disable your plugins. Connect to your server via FTP and navigate to your wp-content directory. Rename your plugins directory in this folder to a temporary name, like plugins-temp. Since WordPress looks for a directory called “plugins” for any plugin components, by renaming the directory you are essentially “hiding” your plugins from WordPress until you change the directory name back. Now, refresh your website; since all your plugins are now deactivated as far as WordPress is concerned if you find your site is back up and running you know that one of the plugins are to blame and can start activating them one-by-one. If disabling the plugins via either method doesn’t help, then activate the plugins in your dashboard or rename the plugin back to the default name depending on the method you used; we’ll need to try another solution.

Change the theme

If you have access to the dashboard try changing the activated theme to one of the default ones like Twenty Thirteen, then check your site again; this will tell you if the issue is specific to a theme. If you don’t have access to the dashboard then it makes things rather trickier. In this case, you’ll have to edit your WordPress database (using phpMyAdmin for example). Once you’ve got access to your database, navigate to the wp_options table and find these two options: template and stylesheet. Both option values should be replaced with the title of the directory of the theme you want to activate – e.g. twentythirteen. Then you can refresh your site to see if the issue is theme-specific.

The steps detailed above will usually get your site on it’s feet again when you suffer a White Screen of Death. You may also want to try increasing your PHP memory limit (when you run the debug mode you might see a memory error). To do this, open the wp-config.php file again and change this line:

define('WP_MEMORY_LIMIT', '64M');

The amount of memory depends on the server, you should ask your server provider about the maximum value available for your site before changing this setting.

Summary

The White Screen of Death can be scary at first, but seeing it doesn’t mean that your site is lost. With the steps above, you can figure out where the issue originates and resolve it. Don’t forget though, that the safest protection against issues like this is a robust backup policy. Make sure to backup your site and database regularly, and especially when you are going to make changes that could break something! This way, you’ll always have a safe way out should the worst happen.

Share