How to Fix White Screen Of Death – WordPress

How to Fix White Screen of Death WordPress

White Screen of Death WordPress

 

Whats Cause the White Screen of Death

The “WSOD” can be caused by certain errors such as PHP and Database Errors which will display a blank screen with no information, known as the “White Screen of Death” throughout the WordPress Community.

Before you jump to desperate measures there can be a number of possibilities for the “WSOD”

The things we first need to take a look at are the following.

A plugin has a compatibility issue.

  1. The best way to see if it is a plugin error is to log in to your Administration Screen and deactivate all of your plugins. if you can access your site after all plugins have been deactivated we know the issue is definitely a plugin. To find out which plugin is causing the issue I recommended reactivating 1 Plugin at a time and testing your website after each activation.
  2. Once you have found the culprit you can either try updating the plugin or completely removing it so you don’t have any further issues on your site.
  3. If you cannot log in to the Administration Screen. you will need to follow the next steps to deactivate all plugins. To be able to do this without logging into your Administration Screen you will need to have Setup your FTP Connection to your Hosting files.
  4. If you have not created an FTP Connection Please Follow this guide to set up your “Remote FTP Client” Once you have set up your FTP Account or have opened your Files in your FTP CLient you will need to navigate to the folder found under  "public_html/wp-content/plugins" and rename the Plugin folder to something as  “plugins_old” or “PluginsBackup” This will instantly deactivate all of your Plugins.
  5. When you have renamed this folder please try and reload your webpage. If your site has loaded we know that one of your plugins was your issue. You will want to reload/copy your plugins from your “plugins_old” or “PluginsBackup” Folder one by one and reactivate them individually until the culprit plugin has been found.

Your Theme may be causing the problem.

There is a high chance that if you experience the “White Screen of Death” after you have activated a new Theme, or you have recently created a new site within a WordPress Network. That your new theme is either incompatible with either your plugins or the version of WordPress you are using. The most Simplist way to check this is too.

  1. Login to your Administration Area. and activate your default theme that had come with WordPress such as the “Twenty Sixteen Theme”
  2. If you cannot log in to the Administration Area. You will need to connect via FTP and will need to navigate to the active theme folder found under  "public_html/wp-content/themes" and rename your “ACTIVE”  theme to either  “template_old” or “TemplateBackup” This will instantly deactivate your currently active theme and force WordPress to set the default theme – “Please Follow this guide to set up your “Remote FTP Client
  3. If this method has worked for you. then the template that you had activated will not work within your WordPress. If your Template was a custom template and was working before. then WordPress could have possibly Automatically Updated and the template stopped working. if this is you then I suggest you restore your most recent backup or contact us as we hold up to 6 days worth of backups for your website in the case of emergency.

Your Theme directory may be missing or renamed.

This is quite common for developers who have created a local environment and cloned a database which is trying to point to a theme that is missing or has been renamed. to check this solution see if you can access your Administration Area. if your login appears then its a high chance it is theme-related.

  1. Login to your WordPress Admin pageAnd see if you can view the front-end page whilst logged in. if it is an error with your database you should see an error like “The theme directory “{theme-name}” does not exist.” you can solve this issue in a few different ways but the easiest is to try switching to the default theme and then back to your theme or try renaming your theme directory just like mentioned above is “Section 2/Option2” and trying to reactivate your theme or we can simply edit the “Theme” and the “Stylesheet” records within the wp_options of your theme.

 

What Else Can Cause This Problem

If you have tried to fix the issue using the above 3 methods and you’re still are experiencing the “White Screen of Death” then it may be something to do with your hosting we can try these other methods to remedy the issue. before taking any desperate measures. some other issues might include the following categories.

  • Syntax Errors
  • Debugging Mode
  • Auto-Update Failed

I will now take you through each of the above in a step by step process so that we can try to resolve the issue.

Syntax Errors

A common reason for the white screen of death is if have been editing the source code within your WordPress site and you have accidentally mistyped something or have the wrong syntax.

One bad character in your coding or in the wrong place has the ability to take down your entire site.  Which is one reason why you should never edit code on your live site?

But not to worry if you know where the error might be you can always connect to your site via FTP and revert the changes you made manually. Unfortunately, If you don’t know what change has caused the issue you can always reload one of your backup files from Softaculous within cPanel.

This should fix the issue for you. But if you did not set up automatic backups. We can still assist you as we make backups of your account every 24-hours and hold on to your backups for the last 6 days.

Enable Debugging Mode

If your site is still “WSOD” or your admin login is not working either you can enable “WP_DEBUG” which will show any errors that are causing an issue with your WordPress

To enable WordPress’s debugging mode you will need to open your “wp-config.php file within the folder you installed WordPress usually within the “Public_html” Folder.

Within wp-config.php you should see following at the bottom. or line 80.

“define ( ‘WP_DEBUG’ , false );”

Here you will need to replace “false” with “true” and save the config file.  If it does not exist, you can add it yourself.

white screen of death

WP_DEBUG Error Example

With WP_DEBUG Enabled you will now get a white screen but it will display errors that your site is having not a complete fix for the issue but at least you can now see the cause of the problem, if you have note disabled or changed themes yet you will be able to pin-point the troubled plugin or theme file that is causing the issue.

Example

As you can see the message states that the problem is in line 38 of the plugin called “my-test-plugin”. Disabling that plugin should work. and fix the white screen of death.

Auto-Update Failed

At times WordPress may have an issue updating. Most of the time it will sort itself out Automatically, but in some instances it can lead to a white screen of death.

What you need to do to check if it is because of an update is to look in your WordPress Direcetory and see if there is a .maitenance file there. if this file is there, delete it and reload your site again. if the update was successful and WordPress did not remove this file Automatically everything will go back to normal.

If it does not fix the issue it could mean that the update was not successful and you will need to try and automatically update it once again if you cannot do this i recommend looking at WordPress’s “Manual Update Procedure” which will hopefully resolve the issue once and for all.

Summary

There can be numerous things that can make your site have the white screen of death but most of the time it is not as bad as it seems. and disabling a plugin or a theme will usually fix the issue and in more servre issues enabling the debugging feature will help show you where the problem lies.

If you have had any other problems that lead to having a white screen of death please let us know in the comments so everyone else can learn from your experience.

Thanks
Simon M.
Typical Hosting.

 

Simon. M