How to Fix the White Screen of Death in WordPress

Updated on Nov 5, 2019

If you check the WordPress Codex, you can find that the White Screen of Death (WSoD) is at the top of the list when it comes to common errors in the CMS. This guide is to help you fix the White Screen of Death whenever it occurs on your WordPress site.

We will Cover:

What is White Screen of Death?

Similarly to the popular Blue Screen of Death in Windows, the WordPress White Screen of Death (often referred to as WSoD) is a plain screen and many don’t know its exact meaning. WSoD could take over an entire WordPress website, parts of it, or only the WordPress admin panel (wp-admin).

The frustrating part with WSOD is that there are no included error messages to help you deal with it quickly. All you know is that something is wrong and you have to fix it. Luckily, the Internet is always there for you, and since you are here, we should start explaining the different White Screen of Death scenarios.

Scenario 1: You Can’t Access WP-Admin

That’s the scenario where you can’t access your WordPress admin area (wp-admin) because of the white screen. In such cases, you have no other options than using an FTP client such as FileZilla, the cPanel File Manager, or WP-CLI. We will explain later in the post precisely how to use those three for troubleshooting manually.

Scenario 2: It Reflects Only on a Specific Post

There is a chance that you see the white screen only on a specific post or page, or even only when you are trying to edit one in the block editor. In that case, you should be able to access your WordPress dashboard, having the option to work on the issue from there.

Scenario 3: The Entire Site is Affected

There is a chance your entire WordPress site is affected. Again, in this case you will be forced to use FTP or File Manager. Continue on with the post and find out why the white screen occurs and what are the methods to fix this irritating issue.

What Might Trigger a White Screen?

Usually the white screen of death occurs whenever there’s an error in the WordPress site’s PHP or database. To be more specific, WordPress calls out the following three most common reasons the white screen happens:

  • There is a plugin or a plugin update that’s not compatible with any other pieces of software in WordPress;
  • There is a theme that is causing a conflict with the WordPress site;
  • There is a missing theme or plugin file from WordPress;

The WordPress Codex might simplify the white screen with those three possible issues, but the process of fixing the issue is not always quick and straightforward. The goal of this post is to make it clear how you can troubleshoot the white screen of death in WordPress whenever it happens. You will also learn how to minimize the risk of this problem happening again.

Were you Recently Working with Your Active Theme’s functions.php File?

In case you recently worked on your active theme’s functions.php file, there is a chance you have made some improper changes that resulted in a white screen.

To troubleshoot this, you need to revert the functions.php file (before your edit it) to its working state. If the file does not have any important code in it, you can re-download a fresh copy of the theme to overwrite the functions.php file via FTP, so the file would return to its fresh working state.

When you have to edit any WordPress files, it’s best to use a text editor, instead of the theme editor in the dashboard. If you work with the theme editor in your dashboard, there is no way to undo your changes. Using a text editor and File Manager (or FTP) is the safest method of altering any of your website files.

Did you Recently Install, Update, or Otherwise Alter a Plugin?

If you recently worked on a plugin in any way and you now have a white screen problem, there is a high chance the issue is related to that particular plugin. To troubleshoot this, you need to deactivate the plugin and your site should go back to normal. If you wish to continue using the plugin on your WordPress site, do the following:

  • In case you’ve edited any of the plugin files, revert back to their original state;
  • If the plugin caused an issue after you have updated it, inform  the plugin developer;
  • If you installed the plugin for the first time, check whether it is compatible with your current WordPress version (which should be the latest release).

How to Troubleshoot White Screen?

When it comes to WSoD in WordPress, the list of things you can troubleshoot is not a short one. Therefore, we will explain all troubleshooting methods one by one, to make sure everything is as clear as possible.

Troubleshooting White Screen Error with WordPress Recovery Mode

With the new innovations in WordPress, like the Fatal Error Recovery Mode feature, white screens may soon become a rare thing that is much easier to fix.

Since WordPress 5.2, admins can mitigate fatal errors on their websites. That was not possible with previous versions of the CMS, at least not without interference from developers. Even if a fatal error makes the backend of a site inaccessible (like white screen of death does), admins can still log in and work on the issue.

Whenever a fatal error occurs, a screen will show you that your visitors are informed about currently ongoing technical difficulties. Additionally, you will get an email, informing you about the issue, and also including a secret link to the “recovery mode” feature. Clicking this link leads you to the recovery mode.

This recovery mode pauses all plugins and themes (extensions) that are causing a fatal error. This ensures that the admin of the site (you) can work on the backend, without having to face the fatal error. After you have logged in, an admin note indicates that recovery mode has been enabled. Additionally, you will be informed about the plugins and themes that are paused because they are causing fatal errors (and what exactly the errors are). You have the options to:

  • Completely deactivate the plugin or theme;
  • Fix the problem if you have the required technical knowledge, and then resume the extension;
  • File a ticket with the author of the faulty extension or contact its developer, explaining the error.

You can decide to exit the recovery mode at any time. You do that via a button that permanently appears. Keep in mind that if there is still a fatal error, it will remain.

Using WP-CLI to Troubleshoot the White Screen Error

WP-CLI is the command line in WordPress. There are commands for every action that can be performed in the WordPress admin.  After you install WP-CLI, the first thing to do is to enter the command ‘wp’ without arguments. If you see error messages in the output, you will be able to pinpoint the exact issues.

Whenever you need to troubleshoot your WordPress site, WP-CLI can be extremely helpful. It’s also the fastest possible solution for almost every WordPress action. For instance, if you need to find the reason for the white screen of death, WP-CLI can be used for disabling plugins and themes one by one, until the faulty extension gets disabled and the site is up and running again.

Disable/Enable Plugins:

wp plugin deactivate akismet
wp plugin activate akismet

Switch Themes:

wp theme activate twentynineteen

Reverse back to a previous version of WordPress:

wp core update -version=4.9.1 -force

You can see all commands from the WP-CLI official site. There is no reason not to start using the command line. Basically, once you get familiar with the commands, you can customize your own one and do anything you need.

With FastComet, you will have WP-CLI installed everywhere, therefore you don’t have to do it yourself. 

Use the WordPress Debug Mode (WP_DEBUG)

The WordPress debug mode (or WP_DEBUG) is normally intended for testing purposes. However, if you have come this far and you still don’t know the reason for your white screen, it’s time to get the big guns. WP_DEBUG is a tool that’s built into all WordPress installations and it’s turned off by default.

Once the debug mode is activated, there will be an error log for everything that happens when a website is loading (or trying to load). If you choose, you can even make WP_DEBUG display all the information directly on the page. However, we recommend that you use the mode on a testing version of your WordPress site because the gathered data could be sensitive. It could highlight security flaws, or contain personal information.

If you want to activate the debug mode, you have to edit the wp-config.php file of your site. This file is a very important part of your site’s structure because it contains all your database information. Therefore, it’s not a bad idea to refer to the official WordPress documentation before you start editing wp-config.php.

Once you can start debugging, access the wp-config.php file via and FTP client (FileZilla), or the cPanel File Manager. Search for the following line of code (use CTRL+F):

define( 'WP_DEBUG', false );

We already mentioned WP_DEBUG is deactivated (set to ‘false’) by default. In order to activate the mode, you need to change the ‘false’ part to ‘true’. Looks like this:

define( 'WP_DEBUG', true );

After you save the file, debug mode will be activated. You can then display the error log, using two methods. The first method is to generate a log file. You can do that by adding the following simple line to wp-config.php:

define( 'WP_DEBUG_LOG', true );

This line generates a debug.log file in your site’s /wp-content/ directory. The file can be opened and edited with most standard text editors (Notepad, TextEdit, etc.).

To display the error messages directly on your page, include the following line in the wp-config.php file:

define( 'WP_DEBUG_DISPLAY', true );

Now you can check your site HTML and see the error log. You will be doing this to see what might be causing the WSoD. You might even be lucky enough to see where exactly the problem is, with the exact type of the error, the file that needs to be fixed, and even the line in that file with the faulty code:

Parse error: syntax error, unexpected $end in /home/name/public_html/wordpress/wp-content/themes/your_theme/functions.php on line 217

The line above would indicate that the problem lies in the functions.php file, specifically on line 217 (or sometimes line 216). In such cases, you can go right away and check how to fix this particular line.

When you get an error message that is not as pinpointed, you can go on Google and search for it. You will most likely get to see discussions in forums that will help you resolve the issue. Other options are to refer to the WordPress Codex or support forums

When you are finished with WP_DEBUG, don’t forget to disable it. You can do this by going back to the wp-config.php file and revert the ‘true’ line back to its default ‘false’. Leaving the debug mode activated could potentially lead to some serious problems and security issues.

Resolve Syntax Errors

Both developers and site owners tend to add custom PHP code in the functions.php file to optimize or add a particular functionality. This code is sometimes added to integrate third-party services or to improve existing WordPress features.

To avoid mishaps, we recommend that you document every change you have made in the functions.php file. What’s even better, keep backups of the functions.php file. We suggest that prior to each time you edit the functions.php file code, you save a backup version of it with the included date in the name of the file (e.g., functions-10-09-2019.php). This way you will always be able to revert changes to the most current working version of the functions.php file.

How to Fix a White Screen of Death

Since there are many ways to get the white screen of death in WordPress, there are also various ways to fix it. 

Empty the Cache

Let’s start with the easiest step—making sure the issue is not in your browser.
To do that, go to your browser settings to locate your browsing data. From there, you should:

  • Clear saved files data, cookies, and browsing history
  • Wait for the process to finish;
  • Close and reopen the browser;
  • Go to your WordPress site and your admin area;

If you are not seeing the white screen of death anymore, you are done fixing the issue. If the issue persists, continue with the next step.

If you have any caching plugins (WP Super Cache, W3 Total Cache, etc) installed and activated for your WordPress site, make sure that you have them disabled.

Additionally, you will have to clear the stored plugin cache. Most of the caching plugins allow you to clear the cache from their settings page.

Clear Cache in WP Super Cache

Let’s start with WP Super Cache, since it’s the most popular caching plugin for WordPress. When using WP Super Cache, you can clear all cached content with just one click. All you have to do is go to SettingsWP Super CacheDelete Cache.

Clear Cache in W3 Total Cache

W3 Total Cache is also very popular and just as easy to use. Simply go to PerformanceDashboardEmpty all Caches:

Clear Cache in Sucuri

In case you are using the web application firewall Sucuri for the protection of your WordPress site, you should know that it also has a caching layer. To clear that, go to SucuriWAF in the WordPress admin area. In this menu, there is a tab named Clear Cache. Click on it, and then click on the button in the bottom left corner, which is also named Clear Cache.

That’s it.

Disable Plugins Manually

PHP errors are often caused by faulty plugins or themes. You can start the white screen of death plugin troubleshooting process by disabling all your plugins in your WordPress dashboard. If you can access it, start by:

  • First deactivating newly installed or upgraded plugins, and then eventually all of them;
  • If you can access your site after you did that, start activating one by one the plugins that you just deactivated;
  • Once you find the problematic plugin, try rolling its version back via the WP Rollback plugin;
  • If rolling back doesn’t work, contact the plugin developer;

However, if you cannot access the admin area through the browser, you will have to use an FTP client like FileZilla, or the cPanel File Manager, to access your website:

  • Browse your files and find the wp-content folder;
  • Find the ‘plugins’ folder;
  • Rename it to something like ‘plugins_testing’. This way WordPress will not be able to use any plugin anymore since it’s looking for a folder named ‘plugins’;
  • Go to check if your site is available. If it is, you know that one of the plugins is causing your white screen;
  • While you are still using the FTP connection, create a folder named ‘plugins’;
  • One by one, move your plugins from the folder ‘plugins_testing’ to the newly created empty ‘plugins’ folder. This is how you will find out which plugin is the faulty one;
  • When you find the plugin, contact its developer so they can fix the bug.

If the functionalities of the faulty plugin are necessary for your website, try finding another plugin of the same type. There are thousands of WordPress plugins available, and thus the chances to find what you are looking for are high. 

Manually Revert to the Default WordPress Theme

If the plugins trick doesn’t fix the white screen of death, that means there’s a high chance the issue is caused by your currently installed theme. Try changing the theme. If you have access to your WordPress admin area in the browser (wp-admin), proceed as follows:

  • Go to AppearanceThemes and activate the current default WordPress theme (Twenty Nineteen);
  • If you do not have access to the WordPress admin area, proceed as you did with the plugins—use an FTP client or the cPanel File Manager to connect to your web hosting server;
  • Go to the wp-content folder;
  • Find the ‘themes’ subfolder with all the files of your currently active theme inside;
  • Make a copy and then delete the original folder. This will automatically revert your website to the default WordPress theme.

If it fixes the error, then you should check the functions.php file of your faulty theme for any code that might be causing the WSoD error. 

If the error persists, make sure that you contact the theme developer and inform them about it, so they can patch out the issue.

Review Other WordPress Integrations

There are cases with conflicts other than plugins and themes, like with CDNs and SSL certificates. Typically, these types of third-party tools integrate with WordPress without causing issues. However, it may happen that you are unlucky and get a conflict between - for example - a CDN from one provider and an SSL certificate from another. The result of that conflict will most likely be your site going down.

So, this depends on you being aware of everything you install or connect to your WordPress website. In case you have altered anything within your WordPress ecosystem in the last 24 hours— deactivate or remove potential offenders and see if this action restores your website.

If that does not help, continue on with the next step.

Check for a Failed Auto-Upgrade

Your white screen of death might be the result of a failed auto-update. There will be situations when the WordPress auto-update feature fails. Symptoms are:

  • A blank white screen with no information.
  • A warning that the update failed.
  • A PHP error message.

The WordPress automatic upgrade could fail due to a glitch in your connection with the WordPress core files, an issue with your Internet connection during the update, or incorrect file permissions.

Check File Permission Issues

We strongly suggest that you don’t work on your file permissions if you are not a developer, because changing them incorrectly will lead to security issues. Your best move here is to contact our (or your web host’s) technical support via a support ticket and then ask them for assistance.

File permissions are not typically the cause of WSoD, but since anything could be the problem, it’s a good idea to check for file permission and ownership issues as well. It’s possible to fix those file permissions by yourself, but in that case you need to be really confident that you can do it. There are three simple rules in WordPress permissions:

  • Files should be 644;
  • Folders should be 755;
  • The wp-config.php file has to be 644.

If you have SSH access to your server (cPanel Terminal) you could apply the proper rules with the following command:

find . -type d -print0 | xargs -0 chmod 0755 && find . -type f -print0 | xargs -0 chmod 0644

If you are doing that, you have to be in the root directory of the WordPress instance. Still, if you are not confident with working on via SSH, better avoid doing it and just contact technical support.

Change Memory Limits

The white screen of death issue can be caused by a lack of memory to run your WordPress site. A good example is a site that has too many plugins, in addition to lots of traffic. In such cases, the memory limits set by default might not be enough for handling all website instances.

The troubleshooting step here is to try and increase the memory limits of your site and see if that fixes the WSoD.

For that, you need to:

  • Go to the PHP selector in cPanel:
    Find PHP Selector in cPanel
  • Go to Switch to PHP options:
    Switch to PHP Options
  • Change the memory_limit value from the drop-down:
    Change Memory Limit in PHP Selector

    Note: Again, don’t forget to make a backup of the files you are editing.

Still Having Issues?

If, after everything you have tried, your WordPress white screen of death still persists, then the error could be more serious. There are three ways to proceed here.

Restore Your Website - The Importance of Backup

Restoring your site via a previously created backup is probably the method that guarantees success when it comes to removing the white screen of death. You should never forget that backing up is of utmost importance. You always need to be careful before editing sensitive data. Having a backup will ensure that you can restore your WordPress site to its working state in events like the white screen of death (critical errors). You can do a backup just for your files, but you should have a complete backup that would help you restore anything. We have a helpful tutorial on Backing Up a WordPress Site.

Luckily, all FastComet customers have the privilege of daily backups. That means when you need a backup of your site, all you need is to contact our technical support and ask for it.

Reinstall WordPress

The case might be that you have someone else with admin access who did some coding on the backend of WordPress, resulting in the dreaded white screen. Generally, implementing untested changes in the code is not a very good idea.

To fix this, it depends on what the edits were and which file(s) was edited. If you were customizing the .htaccess or the wp-config.php file, you can swap them after downloading a fresh WordPress installation. The other option is to overwrite the entire WordPress core code of your website. In both cases, you need to go to the WordPress download page. Once there, click on the Download button in the top-right.

Download the latest WordPress version and extract the files you need.

Then, go to the File Manager or FTP and delete the file you believe is corrupted. Upload the identical file(s) from the fresh install.

If even that doesn’t work, never lose hope!

Contact FastComet Technical Support

FastComet has a technical support team that is full of experts. They provide 24/7 support service and will always reply to your requests as swiftly as possible. All you have to do is submit a support ticket and explain the issue you are experiencing with your website. It’s always helpful to mention everything you already tried, especially if you want the issue to be resolved as quickly as possible.

How to Prevent the WordPress White Screen of Death in the Future

All the steps that were mentioned in this post show just how sensitive WordPress can be to even the slightest changes. Even when you meant no hard, something could go wrong, and you should be ready to deal with it. Now that you know about the methods to deal with the white screen of death in WordPress, feel free to use this post as your checklist.

As we mentioned, a recent backup will always save you from irritating WordPress errors quickly. But for such situations (as your website going down), always consider using the WordPress testing environment.

We hope you find this article useful. Discover more about FastCloud - the top-rated Hosting Solutions for personal and small business websites in four consecutive years by the HostAdvice Community!

WordPress Hosting

  • Free WordPress Installation
  • 24/7 WordPress Support
  • Free Domain Transfer
  • Hack-free Protection
  • Fast SSD Storage
  • Free WordPress Transfer
  • Free CloudFlare CDN
  • Immediate Activation
View More