How To Fix The WordPress White Screen Of Death?

How to Fix a WSOD

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

  1. Disable All of Your Plugins
  2. Disable Your Active WordPress Theme
  3. Resolve Syntax Errors
  4. Switch On Debugging
  5. Increase Memory Limits
  6. Check File Permission Issues
  7. Check for Failed Auto-Update

1. Disable All of Your Plugins

WordPress plugins enable you to extend the platform’s functionality by adding specific features. They’re one of WordPress most popular features, so a lot of sites tend to have several of them active at once.

If we assume plugins are the culprits for your white screen error, the best way to corroborate that hypothesis is to disable all of them at once. Since you don’t have access to your website, you’ll need to use File Transfer Protocol (FTP), which enables you to access your website using a program and transfer files back and forth securely.

We’ll teach you how to use it in a minute, but for now, log into your 000Webhost accountand go to the Settings > General screen. You’ll find your FTP credentials at the top of the page:

You’ll need the Host name, Username, and Password you find there to access your website using an FTP client. If you don’t have one, we recommend FileZilla, which is a great open-source option. Once you’ve installed and opened it, look for the Host, Username, and Password fields underneath the toolbar:

Enter your credentials within those respective fields, then click the Quickconnect button. The client will connect to your server, and when it succeeds, you’ll see a list of folders appear in the lower right hand panel:

In case you’re confused, the files on the left represent your local computer, while those on the right are your server’s – and you can drag and drop between them. If you do so, the client will initiate a transfer for you – it’s very simple. For now, look for the public_html folder on your server. This directory is also known as your WordPress root folder, and it contains all the files and folders that make the platform work.

Once you’re in, you need to follow these steps in order to disable all your plugins:

  1. Enter your public_html 
  2. Look for the wp-content directory and access it.
  3. Find the plugins folder, right-click on it, and choose the Rename 
  4. Change your folder’s name to something you can easily remember, such as plugins-disabled.
  5. Right-click anywhere within the wp-content folder and use the Create directory 
  6. Name your new directory plugins.

At this stage, you should have two folders: plugins-disabled and plugins. All of your site’s plugins will be in the former, whereas the latter should be empty. WordPress will automatically recognize the folder named plugins, and since it’s empty, all of your plugins will be disabled. Now try accessing your site as you normally would. If the error persists, you’ll need to continue troubleshooting.

However, if you resolved the error, it means a plugin is at fault, so return to your wp-content folder and delete the empty plugins directory. Now, rename the plugins-disabled folder to what it was previously. Inside you’ll find multiple subdirectories – one for each of your plugins:

You’ll now need to change the name of each of those folders one by one, which forces WordPress to disable it. After disabling each individual plugin, try accessing your site again. If the error persists, return the folder you just altered to its original name and try the next one.

Keep going until you find the plugin that’s causing the error. When you do, feel free to delete the folder altogether, which should fix your website. Our advice is to contact the developer for a potential fix if the plugin was vital to your workflow. In any case, you may also need to look for a replacement – one that’s updated and well-received by the WordPress community.

2. Disable Your Active WordPress Theme

If plugins weren’t the cause of your woes, your active theme will become the main suspect. Fortunately, disabling your theme is similar, but much more straightforward than the last method. You’ll need to open your FTP client again and return to the public_html > wp-content directory. Inside, look for the themes folder and follow these steps:

  1. Access the themes 
  2. Look for the directory that shares a name with your active theme. For example, if you’re using the Twenty Seventeen theme, its folder will be called twentyseventeen.
  3. Rename your active theme’s folder to something you can easily remember, such as twentyseventeen-disabled.

Renaming a folder works similarly to plugins with regard to disabling them. Now try accessing your WordPress website. If the WSoD doesn’t appear anymore, your active theme was behind it.

Also, since you disabled your active theme, WordPress should’ve reverted to another default theme, if installed. To get it back to how it was before, you’ll need to re-download the latest version of your theme and test it. Again, as with plugins, we recommend contacting the developer and potentially finding a suitable alternative as your main course of action.

3. Resolve Syntax Errors

Another common reason for the white screen of death is if you were editing the code on your WordPress site and you accidentally mistyped something or have the wrong syntax. One bad character in the wrong place could take down your entire site. Yes, this is kind of scary! That’s one reason why you should never edit code on your live production site.

However, not to worry. You can always connect to your site via SFTP and revert the change you made manually. If you don’t know what changed caused it, this is why you should have WordPress backups in place. Here at Kinsta, you can one-click restore your site to an earlier point in time.

4. 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.

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:

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.

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:

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:

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:

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. 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 or 644,
  • folders should be 775 or 755
  • and the wp-config.phpfile 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.

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.

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

 

Related posts