As a WordPress user, you might be sidelined by an error called white screen of death (WSoD). To fix this error, it’s imperative that we first understand what the WordPress WSoD is & what causes it. We’ll break down everything you need to know, including how to fix it
Have you experienced a “white-out” while working on your WordPress site? Looks like you have one of the most common (and dreaded) errors: the WordPress white screen of death (also known as WSoD). The name itself suggests the gravity of the situation you’re facing. However, we are here to help you through the experience and to pull you out of it. So, hang on!
Although it’s a common WordPress error, WSoD is scary because it doesn’t always display an error message on your screen and you may find yourself locked out of your site. But what makes matters worse is that your site visitors will also face the same problems viewing your site content.
What Is the White Screen of Death?
The WordPress white screen of death is an error that displays a blank web page or an error message. Although it often results from erroneous PHP code or database errors, faulty plugins and themes can also be to blame.
You see, what WordPress does as a content management platform is take all of the data you feed it (think codes, graphics, copy, plugins, themes, etc.) and transform that information into a visual display on the form of a traditional website. Something that people can read and understand without knowing how to read code. But when one or more of these elements is faulty (i.e., something on your site is broken), WordPress may not know how to interpret that information.
Without understanding what to do with that data, the CMS metaphorically throws up its hands and says, “I have no idea,” which results in displaying the white screen of death.]
What the WordPress White Screen of Death Looks Like
Different browsers display the WordPress white screen of death error in different ways. Sometimes, you just see a blank screen (as shown below in Mozilla Firefox):
Other times, browsers display a critical error messages on the screen. An example of this is shown in the Google Chrome browser in the graphic below:
As the above images clearly show, there’s no hint about what is causing the error or how to fix it. As such, you’ll need to experiment a little to solve the problem. Many reasons are responsible for the occurrence of WSoD. A complete understanding of the reason will help you to fix the error efficiently.
How to Figure Out the Cause of Your WSoD Error & How to Fix It
Although the white screen of death often doesn’t display an error message, there are many potential causes of WSOD errors, including:
- PHP errors,
- Database misconfigurations or faulty coding,
- Memory limit issues,
- Buggy or corrupt WordPress themes, and
- Poorly coded or corrupt plugins.
It’s crucial to check your website and your WordPress account methodically in order to find out the reasons behind the white screen of death. However, before going any further and try to implement any changes to fix it, make sure you back up your WordPress site. You can either do this through the admin area of your WordPress dashboard or you can do it manually.
Having a current site backup in place ensures that if something goes wrong, you don’t risk losing everything on your site. Also, you can use the backup to return the site to its previous state so you can try again.
To figure out what’s wrong with your site, try asking yourself a few key questions and see if the accompanying solutions we recommend for each question fixes the issue.
1. Are You Having the Same Issue with Your Other WordPress Sites?
If you’re hosting more than one website hosted with the same provider, you should check to see whether any of your other websites are displaying the same error messages.
- If yes, then the chances are that your hosting provider’s services are down and may be causing the issue. You can contact them directly for more help.
- If no, you should check various aspects of the website that’s down in a thorough manner to get it online again. You can do this by implementing the steps we cover in the sections below, such as checking for issues relating to memory limits, plugins, themes or even post lengths.
2. Has Your Website Exceeded Your Hosting Server’s Memory Limit?
One of the most common reasons for you to get the WordPress white screen of death is if your website script has exceeded the application’s set memory limit. The script will become unresponsive as it will be timed out or will be killed by the WordPress hosting server.
In such a scenario, you’ll have to increase your memory limit for the application. As your memory is exhausted, you might also get a message specifying the problem. In any case, you can allocate more memory to the WordPress install to fix this.
WordPress will automatically try to increase your server’s allocated memory to 64MB by default if it’s set to less than that. However, in the real world, this amount of memory is insufficient for most websites. So, you may want to choose a higher number when specifying your site’s memory allocation.
But how do you change your PHP memory limit in WordPress?
- You can increase the memory allocated to WordPress in the wp-config.php file. The wp-config.php, which file contains your database information and other important settings specific to your site, can be found in your site’s root folder. This file is generated during the installation of the WordPress site.
You can add the following code to the file (typically above the line that says “/* That’s all, stop editing! Happy publishing. */”) to increase the allocation of the memory:
define( 'WP_MEMORY_LIMIT', '256M');
- You can alter your .htaccess file to fix the problem of memory allocation. This method of upping your memory allocation involves adding the following code to your .htacccess file:
php_value memory_limit 256M
- Try allocating more memory via your php.ini file. The php.ini file is a default configuration file for running your website. It’s where you can declare changes to your PHP settings. You can open this file and add the following code to keep your WordPress site going:
memory_limit = 256M
Following any one of the above steps will help you restore your website if the memory limit was the culprit behind the WordPress white screen of death error.
3. Are Your WordPress Plugins Having Issues?
The only way to answer that question is to disable all the plugins in your site dashboard and then see if the problem still persists when you enable them individually. Do you still have access to your WordPress admin area? If yes, then this will be solved in some easy steps:
- Open your WordPress dashboard.
- Click on Plugins in the left-hand navigation.
- In the main window, click the box next to Plugin option to select all of the plugins.
- In the drop-down menu above that defaults to Bulk Actions, select Deactivate.
- Press Apply.
This will deactivate all the plugins. Easy, right? But what if you don’t have access to your site’s WordPress admin area? Then you’ll have to deactivate your plugins manually through your site’s cPanel or file transfer protocol (FTP) client.
The FTP client connects your local files stored in your system to the server online. You can access the directory of your files to deactivate your plugins in the following way:
- Open your FTP client.
- There will be a wp-content folder on your root directory.
- Go to the Plugins folder of the wp-content.
- Rename this folder to break the connection. You can choose to rename it in your own way like “medieval plugins” or “worn out plugins.” (There is nothing wrong with being a bit imaginative, right! After all, the whole point of working is being happy!)
You’re now ready to check your website to see if it’s operational again. If it doesn’t work, “medieval plugins” can once return to the original (vanilla) “plugins” folder name. However, if it works, you can be happier as you can move ahead and check individual plugins for an error.
Now, you can reactivate the plugins one by one and reload the site to check whether each specific plugin is the culprit behind all the havoc. If you find “the one,” you can contact the developer of that plugin and ask them for directions to resolve your WordPress white screen of death error.
Sometimes when the plugins are automatically updated, the website might display the WordPress white screen. If you see that your site is behaving normally after you have deactivated all the plugins, then you have successfully found the root of your white screen. If not, you will know that plugins were not the issue, and you can reactivate them.
4. Is Your WordPress Theme Creating a Hiccup?
WordPress themes are useful tools. But sometimes the theme you choose may create an unexpected problem for your WordPress site. If you recently downloaded or updated a WordPress theme and are seeing the white screen of death, it’s a good idea to verify whether the error is due to a theme you’ve downloaded.
You can do this by completing the following simple steps:
- Go to your FTP client and connect to your website.
- Go to the “/wp-content/themes/folder” that contains all the themes you have installed on your website.
- Go to the current theme and right-click on it.
- Download this theme on your computer as a backup.
- Delete the theme from your wp-content folder after you have downloaded it.
- If the default theme is already installed on your website, then WordPress will start using it automatically.
- If you have not installed the default theme, then you can manually install it with the help of your FTP client.
Reload your website to check whether this has solved your issue. If yes, you can go to the functions.php file and delete all the extra spaces at the end of the code. There are times when taking this easy step will fix the PHP error. You can also try to download and install the fresh code for the theme you want to use. Again, reload the site and check.
5. Is Your Page or Post Too Long to Handle?
Although this is a rare occurrence, sometimes the text processing capacity of PHP on your site is limited and your page or post is too long. This results in the WordPress white screen of death. To resolve this issue, you can change your site’s recursion and backtrack limit functions to significantly larger default limits. This allows you to use more memory for larger inputs.
To change the limits:
- Open wp-config.php file on your WordPress site.
- Type in the following code:
- Save wp-config.php and exit the file.
- Refresh your WordPress website to see if the change has any effect.
After saving the code, you can reload your site and check if the content length was the problem. If not, we still have one final suggestion.
Okay, if none of these options have fixed your WordPress white screen of death issue, there’s one more thing you can try…
Switch Your WordPress to Debugging Mode
WordPress has a special debugging mode that can help you to resolve the WSoD error. If you have a completely white screen that prevents you from accessing the admin area of WordPress, you can switch to WordPress debugging mode to try to detect the issue.
Follow the steps mentioned below to turn on WordPress’s debugging mode:
- Open the wp-config.php file of your WordPress install.
- Find the line of the code labeled define( ‘WP_DEBUG’, false );.
- Change the verbiage from false to true.
- Save and exit the file.
Now, reload your website and check if there are changes or error messages displaying. You might now see error messages that that shed light on the problem area and the line number of that code. Take steps to resolve that problem. If the screen is still blank, you can contact your IT guy to help you.
WordPress White Screen of Death Wrap Up
Conclusively, we can sum all of this up by saying that although there are a few ways to fix the white screen of death problem in WordPress, you should still take the measures prudently. If you’re making changes to your WordPress code without having adequate knowledge of what you’re doing, you might end up accidentally doing something that messes up your site and displays the WordPress white screen of death. So, be sure to follow the above recommendations closely.
If you’re also looking for tips about how to improve your WordPress page load speed, check out our other article.