Wordpress

How to Solve the White Screen of Death in WordPress Using Debug?

Note: This article was updated on 28th September 2017. This is the first lesson I’ve learned while working and setting this website....

Written by Deepanshu Gahlaut · 1 min read >
How to solve White Screen Of Death Problem in Wordpress?

Note: This article was updated on 28th September 2017.

This is the first lesson I’ve learned while working and setting this website. What I did, I modified the theme (some code in widgets.php) that resulted in the white screen of death problem.

In the following introduction, I’ll present what is this problem, why this happens in WordPress and then I will show how using debug function you can resolve the problem quickly.

What is the “White Screen of Death “in WordPress?

According to WordPress support, both database errors and PHP errors can be noticed as a white screen (an empty screen with no information) which is popularly known as the WordPress White Screen of Death (WSD) problem.

Why Does White Screen of Death happen?

Here are the possible reasons and solutions for the WordPress white screen of death issue:

1. Theme may be causing the problem

Sometimes you face WSD after you activate a new theme. Here are the possible solution based on the two cases –

  • You are able to access your login to WordPress ex. yoursite.com/wp-admin:
    Solution: Login to WordPress admin screen. Activate default WordPress Twenty Seventeen Theme.
  • You are unable to access your login to WordPress ex. yoursite.com/wp-admin:
    Solution: If you are not unable to access your WordPress admin screen, access your website via FTP and go to /wp-content/themes/ folder. Just rename this folder for the active theme.

2. A plugin is causing compatibility issues

You can face white screen of death after you activate a new plugin. Here are the possible solution based on the two cases –

  • You are able to access your login to WordPress ex. yoursite.com/wp-admin:
    Solution: Try deactivating all plugins and then reactivating them one by one.
  • You are unable to access your login to WordPress ex. yoursite.com/wp-admin:
    Solution: In this case, access your website via FTP. Go to /wp-content/plugins and rename the Plugin folder to old_plugins. It will deactivate all the plugins.

How I Solved This Problem By Using DEBUG function?

I was unable to access both, my website and WordPress admin login. Then, I tried this method using cPanel which is described here.

Here is the problem snapshot. Are you getting the same error?

wordpress admin loginStep 1: The WP_DEBUG option is situated in wp-config.php file which controls the reporting of errors and warnings. By default, this value is false.

 Solve the White Screen of Death in WordPress Using Debug

Change the false value to true, as indicated below: define(‘WP_DEBUG’, true);

Step 2: Save this wp-config.php file.

Step 3: Refresh your website. You will get the error, which is causing white screen of death problem.

Wp-debug after true option

Step 4:  As error indicates go to wp-content-> theme folder->twentyfourteen->inc and then open widgets.php and look at the line 41.

Error in line 41 wp-config file

Step 5: Do whatever is right to remove that error. In this case, I removed the line 41 code.

Step 6: Save the widgets.php file.

Step 7: Refresh your website.The website will be live.

Deepanshu's website

I hope your website is live too! If you are still experiencing white screen of death problem, call your developer or some veteran in the WordPress.

What are your thoughts about this problem? Have you ever experienced this? What method have you used to solve this problem? Please share in comments.

Written by Deepanshu Gahlaut
I write on SEO, content marketing, latest technologies, and social media. You can find me online, or at home watching sci-fi movies, listening songs, or sleeping. In addition, my latest obsession is creating, collecting and organizing visual content on my new blog - Infopixi, to help bloggers, marketers, and businesses. Profile