Overcoming The White Screen Of Death

You make a great site. You launch it and watch as people come to visit. Then suddenly your site won’t load. All you have is a blank screen. You have the infamous white screen of death. What now? Follow these steps to troubleshoot your site:

Checking the Error Logs

WordPress is written in a programming language named PHP. When an error occurs in PHP, the details are written to a file called “error_log” in the same location that WordPress is installed.

Breaking the error line into it’s component parts, you can first see when the error occurred. In the case of the above example, the error was reported by PHP at 11:18 AM on November 28th. If your website stopped working around this time, then we need to examine this error in more depth.

The next two parts tell us the error and where in the PHP scripts it is happening. By itself, “Parse error: syntax error, unexpected ‘*’ “ doesn’t tell us much information. However, we can take a look at the script and line where the error is happening.

Without a basic knowledge of PHP, we might not understand why line 2 is giving an error. The next step might be to contact the developer and ask them some questions. Have other people experienced this issue? What other software does the script require? The adventurous might look up operators in the PHP documentation and realize that the above code requires at least PHP version 5.6 to function. Simply providing the correct software environment will bring the website back.

Misbehaving Plugins

WordPress plugins offer a world of possibilities in expanding and customising your website. However, they can also cause PHP to stop working, and thus the White Screen of Death.

Taking apart this error, we can see that PHP can not find a file that the plugin script is looking for; “Failed opening required…” The plugin can be identified from the path supplied in the error; “wp-content/plugins/syntax-highlighter”. Since the goal is to restore the ability to log into the WordPress administration section, the easiest solution is to rename the directory containing the plugin files. In this case, “wp-content/plugins/syntax-highlighter” can be renamed to something like “wp-content/plugins/syntax-highlighter-old”. This will deactivate the plugin and allow WordPress to function enough to log into the administration section for further diagnostics.

Verifying Theme Files

Themes are the way WordPress presents your website. Problems in the theme will prevent WordPress from displaying your site.

Theme errors can be a bit more difficult to handle. You’ll need to access your WordPress database. You can determine which database WordPress uses by looking at “wp-config.php”, located in the same place as your WordPress installation.

The name located next to “DB_NAME” is the database you will need to edit in order to change the WordPress theme to a known good theme. In this example, the database name is “user_wrd3261”. Access to the database will vary by hosting provider. Many hosting providers provide access through a software package called “PHPmyAdmin”.

Once you have access to the database, you will want to find the table with the name ending in “_options”. On the “_options” table you are looking for the rows “stylesheet” and “template”. You will want to change these two rows to one of the default themes, such as “twentyfifteen”. The change of theme should allow you to access the WordPress administration section where you can do more exhaustive diagnostics.

By checking the server’s error logs, you can determine if the problem is a plugin, theme issue, or something more serious. Confirming your configuration will make sure WordPress is finding all the information it needs. If your theme is missing files, replace them. If it all fails, consult a developer.

Featured image, “ERROR”, by sisssou is licensed under CC BY 2.0