WordPress White Screen Of Death – How To Fix It Fast

By , Updated: April 20, 2017

wordpress white screen of death

Nothing is worse than browsing to your WordPress site and suddenly being met with the white screen of death, making it inaccessible to both administrators and visitors. Today we are going to walk you through six common issues that arise with the WordPress white screen of death, the most frequent causes and most importantly, the solutions to them so you can get your site back up and running as fast as possible.

WordPress White Screen of Death

A WordPress white screen of death (WSOD) is almost always caused by PHP code errors or memory limit exhaustion. The first thing you should do is determine whether or not the admin on your site is working. If the front-end of the website is down, but the admin is working, chances are you have a faulty theme or plugin. You can check your admin by simply browsing to yourdomain.com/wp-admin.

A white screen of death also might appear slightly different depending upon the browser. Here is an example in Google Chrome. It actually gives us a warning saying “This page isn’t working and is unable to handle the request.” This is an HTTP 500 error.

wordpress white screen of death chrome
WordPress white screen of death in Google Chrome

In Mozilla Firefox, it is just a completely white screen with no errors or warnings.

wordpress white screen of death firefox
WordPress white screen of death in Mozilla Firefox

If you are seeing a screen like above, here are six common steps to resolve the issue:

1. Disable Plugins and Themes

One of the easiest and most common ways to fix the WordPress white screen of death is to simply disable all your plugins. A lot of times a site goes down due to a bad plugin update. If you can still access your admin, a quick way to do this is to browse to “Plugins” and select “Deactivate” from the bulk actions menu. This will disable all of your plugins. If this fixes the issue you’ll need to find the culprit. Start activating them one by one, reloading the site after each activation. When your front-end goes down, you’ve found the misbehaving plugin. You can then reach out to the plugin developer for help or post a support ticket in the WordPress repository.

deactivate all plugins
Deactivate all WordPress plugins

If you can’t access your admin you can FTP into your server and rename your plugins folder to something like plugins_old. Then check your site again. If it works, then you will need to test each plugin one by one. Rename your plugin folder back to “plugins” and then rename each plugin folder inside of if it, one by one, until you find it.

rename plugin folder
Rename WordPress plugin folder

The same goes with your WordPress themes. You can replace your theme temporarily with a default WordPress one, Twenty Seventeen is a good choice. If you can access your admin, go to “Themes” in the Appearance menu, and you can activate the Twenty Seventeen theme and then test your site again. If your site pops back up the issue is within your theme.

switch out wordpress theme temporarily
Switch out WordPress theme temporarily

If you can’t access your admin, the process is the exact same as with plugins. Rename your wp-content/themes folder to something else, such as themes_old. WordPress will then revert to the latest default theme, which is most likely Twenty Seventeen (if you don’t have any other themes, you can download Twenty Seventeen from the WordPress repository and upload it to your themes folder. Then check your site again. If it works, then perhaps your theme has a conflict or bad update, in which case you might need to reach out to the developer of your theme.

rename wordpress themes folder
Rename WordPress themes folder

2. Switch On Debugging

If you are still seeing the WordPress white screen of death, or the admin isn’t working (or if you’ve found the culprit but want to dig deeper) you can enable debugging which will expose any errors. The issue is that when a fatal error occurs the script simply ends execution. If this happens before any content is displayed, all you’ll see is a white screen with absolutely no text.

To enable debugging you’ll need to open the wp-config.php file of your WordPress install. Within it you should find the following line:

define( 'WP_DEBUG', false )

You’ll need to replace false with true and reload your site. If it doesn’t exist, you can add it towards the top.

wordpress debugging
WP_DEBUG example

Instead of the white screen, you’ll get a white screen and error messages. Not a huge improvement, but at least we can get started! If you haven’t disabled plugins and themes yet you’ll be able to figure out which one the culprit is by looking at the error message. It should state which file the error originates in, something like this:

Cannot redeclare get_posts() (previously declared in /var/www/html/wordpress/wp-includes/post.php:1874) in /var/www/html/wordpress/wp-content/plugins/my-test-plugin/my-test-plugin.php on line 38

You can see at the end of the message that the problem is in line 38 of a plugin called “my-test-plugin”. Disabling that plugin should work.

If you’re happy with modifying code you may also be able to fix it. If this is a plugin from the repository, I recommend writing to the author instead of doing it yourself though. If you modify the plugin you’ll have to maintain all your changes which is a headache, it’s easier to deactivate it until it is fixed by the developer. If you don’t see any errors at all after enabling debugging, you might need to reach out to your host, as debugging might not be correctly configured on your server.

3. Increase Memory Limits

If you still see an empty page or get an error complaining about memory limits or exhausted memory you’ll need to assign more memory to the application. This can be done through the wp-config.php file on many installs, just add the following code to the file:

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

If this doesn’t seem to work you have a few options. In a regular environment you can use your .htaccess file – in the WordPress root directory – to increase the memory limit, simply add the following line:

php_value memory_limit 64M

If you’re on an awesome host like Kinsta and your website runs lightning fast because the architecture uses NGINX, .htaccess is not available. You can use your php.ini file to increase the memory limit. Anywhere inside the file add the following line:

memory_limit = 64M

If you’re still out of memory and you need to assign more and more, there may be an issue within your application. Perhaps your theme or one of your plugins is using an inordinate amount of resources. Ask a developer to take a look, even your host may be able to help by showing you the SQL logs and other resource stats.

4. Check File Permission Issues

We haven’t seen a white screen of death due to this, but permission and ownership issues can still cause problems. Who knows, in some circumstances, it may lead to a white screen of death! It is possible to fix this yourself, but unless you really know what you’re doing we would advise against it. For WordPress there are three simple rules:

  • files should be 664,
  • folders should be 775,
  • and the wp-config.php file should be 660

If you have SSH access to your server you can apply the appropriate rules with the following command, running it from the root WordPress directory.

sudo find . -type f -exec chmod 664 {} +
sudo find . -type d -exec chmod 775 {} +
sudo chmod 660 wp-config.php

If you are unsure how to do this or are a bit scared go ahead and ask your host. Some WordPress-specific hosts even have automatic permission checking which can figure all this out for you.

5. Check for Failed Auto-Update

Sometimes WordPress may run into an issue with updates, like the server timing out. More often than not, this resolves itself automatically, but in some wild cases, it may lead to a white screen of death.

The first thing you should do is go into your WordPress root directory and see if there’s a .maintenance file in there. Feel free to delete that file and load up your site again. If the update was successful, but WordPress failed to remove this file automatically, everything will go back to normal.

If the update was not completed it may be done automatically for you, in which case things should go back to normal just the same. If all else fails, follow the recommended WordPress manual update procedure which should resolve the issue once and for all.

Summary

There are a number of things that can go wrong, but thankfully the situation is usually not as dire as it seems. A simple plugin/theme check should fix the issue and enabling debugging will definitely shed more light on the problem. If you’ve encountered any other WordPress white screen of death situations let us know so we can learn from it and share the experience!