When I first encountered WordPress screen of death, I thought my site has just got hacked or something very serious had happened. As it is the case with majority of newbies, WordPress white screen of death causes severe panic. When you experience WordPress screen of death, you should not panic since majority of the causes can be easily fixed as you will find out in this tutorial. I will go a long way to illustrate the different causes of WordPress white screen of death and where possible, I will create the error and resolve it. The objective of this tutorial is to enlighten you on the different causes of white screen of death in WordPress and how you can resolve them.
What is WordPress White Screen of Death?
WordPress white screen of death is a common manifestation of PHP and or Database errors as a white blank screen without any information. Since the nature of this screen in programming is commonly called white screen of death, the term has been adapted in WordPress too. There are a number of reasons why this error occurs and it is one of the common errors seen in WordPress development and is commonly abbreviated as WSOD.
Causes and Solutions of WordPress White Screen of Death
Before you panic when you encounter a white screen of death in WordPress, it important to understand the following common causes of this error;
Cause 1: Plugins Incompatibility
If you suspect that a plugin is causing the WordPress white screen of death, you probably activated a plugin, change the settings of a plugin or modified the code of an active plugin before the error occurred.
Restore Edited Plugin File
If you have edited a plugin and got this error, the cause of white screen of death is an error in the edited PHP file. You need to remove that plugin immediately or restore it to the original state as it was before you edited the plugin’s file.
WordPress Version Incompatibility
White screen of death caused by activating or updating a plugin means there is incompatibility with WordPress API function. Plugins that override WordPress pluggable functions are common culprits resulting in WordPress white screen of death. Care should be taken when updating plugins that utilize pluggable function to avoid this error.
Conflicts with Other Plugins
Another cause of WordPress white of screen of death is plugins conflicts. If you suspect this is the cause of the error you should deactivate all the plugins then reactive the plugins one by one. This will allow you to identify the trouble maker, since when you activate the plugin that is causing the problem; you will immediately see the WordPress white screen of death. When you identify the plugin, it is advisable that you remove the plugin to avoid future occurrence of this error.
Cause 2: Theme Errors
There are a number of issues that can result to WordPress white screen of death that are related to WordPress themes, here are the causes and the solutions;
Parse Error in php
WordPress white screen of death also results when you edit a WordPress theme and there is an error in the functions.php file. You may see a white screen of death with a parse error like this;
This simply means there is a problem in the line of code 284 inside the functions.php file which is caused by a syntax error. To fix this problem you should simply open this file and check the line of code. You can alternatively fresh the copy of function.php file with a fresh copy if you had backed up your WordPress theme. The overall solution of this problem is to always create a child theme in order to carry out all the changes on the child theme to avoid modifying the parent’s function.php file.
Broken WordPress Themes
There are some WordPress themes that are incomplete and they have some missing files. When you install and activate this kind of theme, you will encounter a white screen of death. To solve this you should log in into your dashboard and activate the default WordPress theme. In case you are not able to access the dashboard, use the FTP or Cpanel to delete the theme. WordPress will automatically revert to the default WordPress theme when you delete the theme causing this error. The overall solution for this problem is to ensure you install themes from reputable authors and scrutinize each theme before you can decide to use it on your site.
New Network Site in WordPress
Another common occurrence of WordPress white screen of death is as a result of creating a new network site. WordPress allows users to create multiple sites in form of a network that allows management of multiple sites under one domain. It’s a common observation that creation of a new network site sometimes results to a white screen of death. The solution for this error is to activate the default WordPress theme as well as to clear the cache.
Cause 3: Exceeding Memory Limit
Another common cause of WordPress white screen of death is when the PHP limit on the server is exceeded. There are just a few ad hoc way of fixing this problem but the solution will soon be outlived.
Simply increase the PHP memory limit on your server. You can do this by editing the following line of code in your wp-config.php file;
The value 64 can be changed upwards to allow the PHP more memory but you should check with your host recommended higher limits for PHP memory. The ultimate solution for this problem is simply upgrading your hosting to a better package.
Tips for Troubleshooting WordPress White Screen of Death
There are a number of useful tips you can employ to help you fix WordPress white screen of death as soon as you encounter it. Let me outline each of these tips;
1. Renaming WordPress plugins folder
When you suspect WordPress white screen of death is caused by a plugin and you cannot access the dashboard; you should use FTP or Cpanel to locate and rename the plugins folder. Rename plugins folder under wp-content/plugins to ‘old_plugins’ then create a new folder and name it plugins.
This automatically deactivates all the plugins and you can reinstall the plugins one by one as you sort them to identify the troublemaker.
2. Enabling WordPress Debug Mode to Report Errors
An easier way to identify the plugin causing problems or a theme is to enable error reporting in wp-config. Just like how PHP error reporting is enabled in a server, in WordPress there is a debug function to help you see the errors causing WordPress white screen of death.
Open wp-config.php file and look for the following line of code;define('WP_DEBUG', false);
This is a Boolean argument and needs to be changed to TRUE, to switch it on. If your wp-config.php does not have this lines of code at the bottom (Note the FALSE is changed to TRUE).error_reporting(E_ALL);
After updating the wp-config.php file you should now refresh your site and will see the errors
To illustrate WordPress white screen of death, I have created a small deliberate error in the functions.php of twenty sixteen theme that automatically resulted to white screen of death.
To understand the cause of this error I have edited the wp-config.php to enable the debug mode;
When you refresh the site you can now see the error and correct it since it shown on the precise path.
In conclusion as outlined in this article WordPress white screen of death should never be a reason for any panic, with carefully guided thought, you can easily identify the cause of this error and quickly fix it.
In rare situations where this problem cannot be fixed you can reinstall your WordPress manually and connect to the same database you were using before, thereby safeguarding against loss of data.
I hope this article helps you understand the common causes of WordPress white screen of death and how to deal with them. Feel free to ask further questions, share your experiences and get in touch using the comments section below.