Nothing is worse than loading your website and seeing a blank, white screen. No error message, no clear problem, just 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? No need to panic, here’s how to fix it fast.

What is the 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.

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

How to fix the white screen of death

#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 plugin

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.

The same goes with your WordPress themes. You can replace your theme temporarily with a default WordPress one, Twenty Nineteen 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.

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 Nineteen (if you don’t have any other themes, you can download Twenty Nineteen 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.

#2 Resolve Syntax Errors

Syntax errors are typically caused by a mistake in your code syntax. You may have accidentally mistyped or pasted in the wrong syntax, and that caused the WSoD.

The easiest way to resolve syntax errors is to roll your site back to the version before the white screen of death. This pushes your site back and restores it to the last backup before the errors were made, rather than having to jump in and edit the code.

Another way to resolve syntax errors would be to edit the file(s) mentioned in the syntax error. Typically a syntax error will reference a file along with the line of code in which the error is found.

To edit the impacted file(s), you can take two different approaches:

  1. Download the impacted files via FTP or SFTP, depending on your server settings
  2. Use a tool offered by your web host to edit a file directly on the server

An FTP client is an application that helps you connect to your website and transfer files using the FTP protocol. Some free solutions include Filezilla and Cyberduck. Once you’ve downloaded the impacted file(s), try to determine the source of the error based on the line code in a text editor, such as Sublime. Once you believe you’ve corrected the syntax error, upload the file back to your server via FTP. Hard refresh your site to see if your site returns to its normal state.

The second option is available if your web host offers a tool to edit a file directly on the server through an online file management tool. If they offer a tool of this nature, you can log in, find the file, make the necessary changes, then save.

#3 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:

  1. files should be 664 or 644,
  2. folders should be 775 or 755
  3. and the wp-config.php file should be 660, 600, or 644

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.

#4 Check for Failed Auto-Update

Sometimes WordPress runs into an issue with updates. Most of the time, it resolves itself, but occasionally it leads to the white screen of death.

There are two ways to complete a WordPress update:

  1. Deleting the .maintenance file
  2. Manually updating

The first step is to go into your WordPress root directory and see if there’s a .maintenance file. The name begins with a dot, which means it’s a hidden file. If you don’t see it using your FTP program, try logging into your server’s control panel and using the file manager to find and delete it. After deleting that file, load up your site again. If the update was successful, and WordPress just failed to remove that file automatically, your site will load like normal.

If you’re still seeing problems, there’s a chance the update wasn’t successful. In this case, you may need to manually run the update. This guide can help you do that.

#5 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 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.

#6 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.

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.

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 enable 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!

Leave A Comment