According to the WordPress Codex, the white screen of death is one of the most common errors that occur in the CMS. A user may either be inside WordPress while it happens or is attempting to log into the WordPress wp-admin, only to discover a blank page.
Typically, the white screen of death arises when an error takes place in a website’s PHP or database. More specifically, WordPress calls out three reasons why this could happen:
- A plugin or update to a plugin is incompatible with another piece of software in WordPress.
- A theme causes a conflict with something already on the site (like a plugin that calls on the same script).
- The theme file is missing from WordPress.
Although the Codex simplifies the answer to three seemingly innocuous issues, diagnosing and fixing the white screen of death isn’t always that straightforward. In the following guide, we will cover how to troubleshoot this error when it happens as well as how to set up your WordPress site to prevent it from rearing its ugly head ever again.
What to Do to Fix the WordPress White Screen of Death
The WordPress white screen of death can be quite scary, especially if you’re logging into WordPress for the first time in a few days and encounter the empty page. What happened? Has your site been hacked? How long has it been this way? Is the website down, too?
When this happens, it’s important to stay calm. There’s almost always a clear reason why it happened and an easy way to get your website and the admin restored anew. It just takes some troubleshooting to sniff out the underlying problem.
Here is what you need to do:
Step 1: Empty the Browser Cache
First things first. Let’s make sure it’s not your personal browser causing the issue.
Go to your browser’s settings and locate your browsing data. You should see a page like this that allows you to clear history, cookies, and saved files.
Clear the data and wait for the process to finish. Close and reopen your browser. Then, go to your website and wp-admin. Do you still see the white screen of death? If not, you’re done and you’ll also notice an increase in site and browsing speed while you’re at it. If you’re still seeing the WSoD, however, move to the next step.
Step 2: Retrace Your Steps
Just like a “death” that takes place in the real world, an investigator would ask if there were any eyewitnesses. And, if there were, would they be so kind as to retrace their steps leading up to the death/murder/crime.
In this case, it may be up to you to piece together this puzzle in the lead-up to the WordPress white screen of death.
If you weren’t anywhere near the website when it happened (i.e. you only just discovered it this morning when trying to log in), then go to the next step.
🚶 If you were inside of #WordPress when the screen suddenly went white, don't freak out! Take a deep breath, stop and retrace your steps. Click To TweetWhat were you doing at the time? Were you coding something? Did you install something new? Were you configuring settings in the database? How about any members on your team? Was anyone working within WordPress when it happened?
If so, locate the step below that addresses that specific action:
- New or updated WordPress theme
- New or updated WordPress plugin
- New integration with WordPress (like a CDN or SSL certificate)
- Changes implemented to file in the database
- Memory or execution time exceeded
If none of these ring a bell, move to the next step.
Step 3: Check the Admin and Website for Clues
Verify that the “death” has affected your entire website, backend and frontend. While the WordPress wp-admin blank page won’t be able to tell you anything about the source of the problem, the front end of the site might.
In some cases, the white screen might be accompanied by an error message. If the message makes mention of a missing theme, the website timing out, or the surpassing of a memory limit, drop down to the relevant section in this guide. If there are no clues given, move to the next step.
Step 4: Test the WordPress Theme
Obviously, if you see an error message on the frontend of the website that says a theme is missing, address this first. As the WordPress Codex explains, the issue could easily boil down to a developer building a website in a local testing environment, but then forgetting to properly transfer the theme’s files to the live installation of WordPress.
If this is the case, then all you need to do is upload those files through your SFTP.
If that isn’t the issue, then we need to rule out the WordPress theme as the problem.
To do this, go to your control panel’s file manager or SFTP (wherever you’re most comfortable editing files in the database). From there, locate the wp-content folder. You should see a list of folders like this:
Select the Themes folder and rename it.
It doesn’t matter what you call it, it just needs to be a different name so WordPress can’t call on it anymore. This will effectively disable your theme.
If the WordPress theme was the issue, you will regain access to your site through wp-admin. Give it a try.
When the problem is due to a theme, you have a few choices:
- Roll the WordPress theme back to the previous (and safe) iteration. You can do this with a backup or download the older version from the theme provider.
- Contact the theme developer to notify them of the issue and find out when a patch will be issued. Only then will you reinstall the theme on your site.
- Find a completely new theme that doesn’t conflict with anything in WordPress, install it, and get to work on configuring it.
If you’re still seeing the white screen of death, move to the next step.
Step 5: Test the WordPress Plugins
Now, if you find that your WordPress theme isn’t the one stirring up trouble, then there’s a good chance that something in one of your plugins is. Especially if you recently added a new plugin or made an update to one.
Even if you didn’t do anything with the installed plugins on your site, something could have occurred as a result of automating WordPress updates. Unless you have a system that notifies you when automated updates happen, you might not even realize that a change recently occurred.
Regardless of whether or not you were aware of it, let’s focus on fixing this.
The first thing to do is return to your wp-content folder. This time, you need to rename the Plugins folder.
Again, it doesn’t matter what you call the folder. We simply need to deactivate all plugins at once in order to confirm that the white screen of death was caused by one of them.
With the plugins deactivated, go to your website. If you can log in through the wp-admin and your site has been restored, then we’ve located the problem. However, we need to dig deeper in order to determine if your plugins caused the error.
Log into WordPress and navigate to the Plugins list. All of them will be deactivated.
To locate the problematic plugin, activate each of them, one at a time. Unless you know which plugin was recently installed or updated, and the likeliest of culprits, start with the first one.
Activate the plugin. Refresh your screen. If you are still inside WordPress without any problem, then it’s not this plugin.
Deactivate this plugin once more. Now, repeat the process with the next one. You will need to do this for every single plugin until you find the one causing the white screen of death (if any).
If you should find that one of your WordPress plugins caused the issue, then you need to decide which of these three actions to take:
- Roll the plugin back to the previous iteration. You can get this from your backed-up site or download it from the WordPress repository.
- Contact the plugin developer to seek out a patch for the plugin (especially if it’s essential to your site’s functionality).
- Find a new plugin to replace the functionality and install it.
If, after doing all this, you haven’t found the source of the problem, move to the next step. Just be sure to leave all your plugins deactivated until the very end of the troubleshooting process.
Step 6: Review Other WordPress Integrations
Conflicts can occur outside of WordPress plugins and themes, such as with CDNs and SSL certificates. For the most part, these kinds of third-party tools will seamlessly integrate with WordPress. However, if you should happen to hit a bad combination–perhaps with a CDN from one provider that conflicts with the SSL certificate from another–your website could go down as a result.
So, this goes back to being cognizant of anything new you’ve installed on or connected to your WordPress site. If you’ve altered anything within the WordPress ecosystem in the last 24 hours–even if it’s outside of the platform–deactivate or remove the potential offender to see if that restores your site.
And, if it doesn’t, move on to the next step.
Step 7: Restore Recently Updated File to Original State
This kind of error will be glaringly obvious. If you or someone else with admin access was cowboy coding on the backend (i.e. implementing changes to the code without first testing them on a staging site), and the white screen of death appeared immediately after saving the changes, there’s your problem.
To fix this, it will depend on what the file was. If you were customizing something like the wp-config.php or .htaccess files, and don’t have an unaltered version of the file saved, you can swap it out for one found in a brand new WordPress download.
Go to the WordPress.org website. Click on the “Download” button in the top-right.
Download the latest version of WordPress. Extract the files you need.
Then, go into your file manager or FTP and delete the file you believe is corrupted. Upload the identical file from the fresh install.
If you return to WordPress and the blank page is gone, you can resume what you were doing. Just make sure to test any new code off-site before applying it to your WordPress site.
If this doesn’t work, or there was another file you altered and need to restore, check to see if there was a recent backup of your website saved. If there is a version of it prior to the coding error and that won’t result in serious reworks of the website, you can always use your backup-and-restore solution to get your website back up and running.
If none of that works, move to the next step.
Step 8: Adjust the Server’s Memory Limits or Execution Time
In some cases, the issue isn’t due to faulty coding or a conflict between software. ℹ️ Sometimes, the white screen of death is caused by your website’s default settings for memory and execution times. Yep, annoying. But if you get white-screened, always check this! #WordPress Click To Tweet
Say, for instance, you recently installed a WordPress theme on your site. It wasn’t until you tried to activate a demo that the white screen of death appeared. In this case, the problem isn’t with the theme itself or even the template files. It’s with your server’s ability to process what’s likely a large number of files.
To fix this, you can do one of two things, though both might be necessary.
First, you should adjust the memory limits. If you don’t receive an error message that recommends setting them to a certain limit, start with 64 MB.
There are three files in which you can make this change. Before doing so, make sure you save a copy of the files you choose to alter somewhere on your machine.
Add this to wp-config.php:
Or add this to .htaccess (which may be hidden, so make sure to reveal all files when you open your file manager or SFTP):
php_value memory_limit 64M
Or add this to php.ini:
memory_limit = 64M
You don’t need to apply the change to all three files. Start with wp-config.php, save the changes, and check WordPress again.
Next, you should adjust the maximum execution time allowed. If the white screen of death didn’t come with a note recommending an increase of execution time, start with 60 seconds.
There are two files in which you can change this:
Add this to .htaccess:
php_value max_execution_time 60
Or add this to php.ini:
max_execution_time = 60
Again, only one file needs to be edited.
Make your changes, save them, and return to WordPress. If the problem stemmed from your server’s ability to handle the size of a request, this should clear up the issue. If not, let’s try one more thing.
Step 9: Debug the wp-config.php File to Reveal PHP Errors
If the wp-config.php file wasn’t the source of the issue, you can use this tool to run a debug on your server.
Back in your control panel, locate the wp-config file in your database.
Open the file and search for a line that reads:
define( 'WP_DEBUG', false );
If it’s there, change false to true.
If it isn’t present, add the line:
define( 'WP_DEBUG', true );
Save the changes.
If there are any problems with the PHP on your site, the debugging will reveal them. Review the results, amend the issue, and check WordPress again to see if the white screen of death is gone.
Regardless of whether or not this reveals anything, remember to change that value back to false after you’re done with it. WordPress typically advises that the debugger not be used on live sites, so you don’t want to leave that running once your site has been restored.
If you’re still having problems, you have one more option.
Step 10: Contact Your Web Hosting Company
If all else fails, reach out to your web hosting company for assistance. They should be able to provide you with insights into changes that recently occurred on your website or on the web server. If something went down on their end or another website on a shared server is eating up all the resources, they’re the only ones who can help at this point.
Realistically, though, you should be able to resolve this issue using one of the steps above. It’s just good to know you have this option.
How to Prevent the WordPress White Screen of Death in the Future
The ten steps above–and the underlying problems behind each–show you how sensitive WordPress can be to a “bad” change. Even if you meant the site no harm, something as simple as updating a WordPress plugin could take it offline and block your access to it (at least through the WordPress wp-admin).
Now that you know what to do if you encounter the WordPress white screen of death, let’s briefly sum up what you should do now to prevent it from happening again:
- Create daily backups of your website and store them on a separate server or platform. You can do this with a backup-and-restore plugin or through a third-party service.
- Be cognizant of all updates made to the core, plugins, or themes–even if the process is automated. Notifications may seem unnecessary and tedious, but not if they save you time troubleshooting the white screen of death.
- If you manually handle WordPress updates, always do them first in a testing environment to verify there are no conflicts with anything else on the site.
- If implementing changes to the code of your site, always do them first in a testing environment to ensure they won’t break anything.
- Implement a system of strict user control, so you have a record of who edited what and when.
- Use web hosting that provides solid support 24/7, especially if you intend on working with the code of your website.
And, of course, if you want to reduce the chances of a rogue update or unmonitored change negatively impacting your site, hire a WordPress maintenance provider. With a company like WP Buffs on your side, many of these issues can be avoided by handing the reins over to a WordPress expert.
Want to give your feedback or join the conversation? Add your comments 🐦 on Twitter.