Resolving WordPress’ White Screen of Death

Imagine you woke up this morning to see that your WordPress site which had been working perfectly the day before, had suddenly gone completely nuts and is now displaying a blank white screen?

Frustrating, I know right!

Sometimes, WordPress sites can just go “blank” completely (we call this the White Screen of Death) for a number of reasons. It could be as a result of plugin malfunction, missing WordPress file(s) or many other reasons. You’ll often times see an error like so:

There has been a critical error on your website.

In this article, Ill be sharing how to quickly resolve this issues on your WordPress site so that it can come back alive.

Finding the Error

The first thing to do to ascertain where the problem is to turn your WordPress’ site DEBUG feature ON. By default this is switched OFF, by turning it on you’ll be able to see exactly what the error is and then you can fix it.

  1. Login to your Site’s Control Panel.
  2. Locate File Manager.
  3. Locate your WordPress wp-config.php file in your root folder (public_html).
  4. Open your wp-config.php file and look for the line that contains the following line of code:
define( 'WP_DEBUG', false );

5. Change the above line of code to:

define( 'WP_DEBUG', true );

6. Save your wp-config.php file.

7. Run your website and look out for the error that is displayed on your screen.

It may display information on a plugin or it may report that some file is missing like so:

Fatal error: Uncaught Error: Call to undefined method wpCrashSite::getError() in /home/yoursite/public_html/wp-content/plugins/wp-crash-site/wp-crash-site.php:22 

OR

Warning: require(/home/yoursite/public_html/wp-includes/blocks/block.php): failed to open stream: No such file or directory in /home/yoursite/public_html/wp-settings.php on line 269

The first line on the first error shows a plugins path (this means it is most likely a plugin problem or malfunction):

Fatal error: Uncaught Error: Call to undefined method wpCrashSite::getError() in /home/yoursite/public_html/wp-content/plugins/wp-crash-site/wp-crash-site.php:22

The first line on the second error shows an includes path (this means it is most likely a missing file problem):

Warning: require(/home/yoursite/public_html/wp-includes/blocks/block.php)

Once we’ve figured what the problem is, we can now provide a fix for the problem and get our site up and running again.

Plugin Malfunction

WordPress uses Plugins to extend the functionality of most WordPress sites. Plugins are additional piece of code or software written by developers to enable site owners get more out of their WordPress sites. In other words, they provide capabilities that don’t originally come with WordPress’ native installation.

For e.g. you can download a plugin that can help you display a form on your website where people can fill information and send to your e-mail or back-end or you can download a plugin that can help you display the different dates or timezones around the world on your home page.

So Plugins can be very useful on WordPress sites and like most things created by humans, they sometimes fail. Here are however, few steps to help you solve plugin malfunction, should they occur:

  1. Login to your WordPress Admin Dashboard (www.yoursite.com/wp-admin).
  2. Go to Plugins section.
  3. Carefully, deactivate the first plugin and check to see if your site resumes normally, if it does, then you’ve located the faulty plugin and would have to either upgrade it or find an alternative plugin.
  4. If Step 3 doesn’t work, repeat same action for other plugins one after the other, until you locate the faulty plugin and then proceed to upgrade it or find an alternative plugin.

If you can’t login into your WordPress Admin Dashboard, then do the following:

  1. Login to your Site’s Control Panel.
  2. Locate File Manager.
  3. Locate your WordPress wp-content folder in your root folder (public_html).
  4. Locate your plugins folder in your wp-content folder.
  5. Rename your plugins folder to any other name (for e.g. plugins_resolve), by doing so, you’d be deactivating all plugins in your site’s WordPress installation.
  6. Now, login to your WordPress Admin Dashboard (www.yoursite.com/wp-admin), you should have unfettered access now that all the plugins are deactivated.
  7. Go back to your Control Panel and rename your plugins_resolve folder (or whatever name you used previously) to its original name (plugins).
  8. Now, go to Plugins section in your WordPress Admin Dashboard, you should see a list of all your plugins deactivated.
  9. Carefully, activate the first plugin and check to see if your site resumes normally, if it does, then it is working properly, move to the next plugin. If it doesn’t, then you’ve located the faulty plugin and would have to either upgrade it or find an alternative plugin.
  10. Repeat same process for other plugins, one by one.

Missing WordPress Installation File

Sometimes, you may have a situation where your site is missing a WordPress installation file or native file. This happens a lot, like the error shown below:

Warning: require(/home/yoursite/public_html/wp-includes/blocks/block.php): failed to open stream: No such file or directory in /home/yoursite/public_html/wp-settings.php on line 269

The error simply says my WordPress site is missing a required native file called block.php and it is supposed to be located in my wp-includes folder.

require(/home/yoursite/public_html/wp-includes/blocks/block.php)

All we need to do is install WordPress locally on our computer or a separate computer of ours and locate that missing file and copy it to that exact required location on our site.

This will solve the problem instantly for most WordPress sites. If there are other missing files, you’d have to repeat the same process for them all until your site is up and running.

Conclusion

I hope you’ve been able to learn a thing or two on how to get your WordPress site up and running again. Leave your comments below and let me know what you think. Thank you.

Full Stack Engineer