How to fix the WordPress white screen of death?

Nadejda Milanova

Nadejda Milanova · 30th September 2021·WordPress

How to fix the WordPress white screen of death?

Have you ever seen a white screen when working with WordPress? This is a relatively common error known as the White Screen of Death (WSOD). You should know that in most cases the culprit is not WordPress. However, what to do when WSOD appears on the screen in front of you? This is usually followed by a call to hosting support and a return from the archive. We decided to show you how you can do what hosting support will do. In a few steps and in 5 minutes you will remove the white screen from your WordPress.

Why does WordPress display a white screen?

The answer to this question is complex, but, as we mentioned, in most cases the culprit is not WordPress. Either the modules or the themes are to blame. Technically, an error occurs in a piece of code and further execution of the code is not possible.

One of the simplest examples we can give is the arithmetic operation A + B * C / D. How is it possible for an error to occur in this formula? It is quite possible if D is equal to zero. And if the above formula is part of a larger one, it is impossible to calculate. This causes the execution to stop and the result to be unknown. In programming terms, the above process of stopping execution is called "exception". Practically in the modules and themes of WordPress there are an awful lot of places where this can happen. All code authors apply many tricks to avoid extremes - check the input parameters, require specific input data, block illogical combinations of user actions and much more. Sometimes, however, all this does not work for other reasons - programming errors, missing files, missing input or others. And that's when WordPress can't continue running and displays the famous "white screen of death."

white screen

Who sees the white screen?

The white screen has 3 subtypes. The first is when it only appears in the admin panel, but users can use the site. The second is when users of the site see it and the administration works. The third and perhaps most common is when neither users see the site nor the administration is working. Of the three types, the the best options is when the administration is not working. Then users and bots crawling the Internet do not stop working. The worst, however, is when nothing works. Then the site always returns an error and is practically unusable.

How to remove the white screen?

The process is relatively easy and simple. All you need is FTP access to the site and a text editor. If you do not have access, the file manager of the hosting will be able to do the job for you.

  • Open the website via FTP or through the file manager. Go to the folder where WordPress is installed
  • Open the wp-config.php file
  • Add 2 rows - bottom: define ('WP_DEBUG', true); define ('WP_DEBUG_DISPLAY', true);
  • Save the changes. At this point, the white screen is disabled and you can see what the error is on the site and what caused it.
  • Open the place where you saw the white screen - be it the site or the site administration. WordPress will now give you some technical information. You should read the "error" section with special care.
  • From the above technical information you will find out which module or which topic is interfering with the normal functioning of WordPress.
  • Problem module
Problem module

If it turns out that the problem is in a module - go with the file manager in the folder wp-content / plugins and rename the module folder, doing it differently. You can add - (dash) at the front or _ (underlined) at the back. An option is to add .notworked on the back.

Theme

Theme

Perform the check. If the site does not work again and this time there are other errors, you eliminate them as in points 3.7. and 3.8. If the site works, move on.

  • We contact the author of the theme or module and inform them of the error we have encountered. This is most often done in the topic or module support forums at wordpress.org. However, if the add-ons are paid - then contact their authors and let them know about the problem.
  • You return to edit wp-config.php and remove the added rows in Point 3.

After the above operations, WordPress will be fully functional with one major difference - the conflicting code is removed along with the entire theme or module. But this way you regain control of WordPress. You will now need to log in to the admin panel and select another theme or another module.

What follows after the quick edit

Now all you can do is wait. Things are out of our control and in the hands of programmers. Sometimes they also see the problem issue and update the problem code within a few hours. Sometimes, however, this takes a few days or a little longer. However, you should know that there are cases in which nothing happens because the author has long lost interest in his work. Now it is necessary to follow in a few hours what is happening with your posting in the forum. If the problem is fixed - install the new and updated version. If the problem is not fixed at all - you will have to choose another theme or module for a period of time to replace the problem.

How to prevent problems?

Unfortunately, no matter how much we want, there is no such possibility. We know from personal experience that this most often happens during the installation of new themes or plugins, or during their update with newer versions. Because sometimes things just don't happen the way we want them to, the only option is archival copies. It doesn't matter if the backups are made by us, which is highly recommended, or the archives will be made by our hosting provider. In fact, it's nice that the two things just happen in parallel. Sometimes it is faster and more convenient to simply return an archive copy of the site that was a day or two ago - so it is necessary to make archives. To do this, ask your hosting support when, how and where the archives are made and kept. Ideally, the archives will be from yesterday (maximum 24 hours), made every day and saved on a remote server. If you also have a week-old archive, it's also acceptable if you don't have any major changes in the meantime.

How to prevent problems

Interesting fact

The white screen of death has the English acronym WSOD and is very similar to the blue screens of Windows better known as BSOD.

BSOD

Although it seems complicated, the above operation takes less than 5 minutes and even beginners will be able to perform it. If you are not sure that you will succeed, you can always contact the support team of your hosting company. The specialists there will return the site from the archive, before the problem existed.

Nadejda Milanova
Nadejda Milanova

An experienced Content creator in the field of Search Engine Optimization (SEO) and WordPress. A true proffesional with a Master's degree focused on journalism.

Read more by Nadejda Milanova
Jivo Live Chat