How to (quickly) debug WordPress white screen

How to (quickly) debug WordPress white screen

In my experience, there are two kinds of people – people who experienced WordPress white screen and people who will experience it sooner or later. For example, one of my clients had a custom coded theme which worked well. But after WordPress 4.2 appeared (he performed an update), his website turned to blank. The issue was with the function get_avatar_url() introduced in WordPress 4.2. and since this function was implemented into his theme, a fatal error occurred and brought the website into the blank.

If you experience blank screen and want to debug your website quickly, the first thing you should do is to disable all the plugins (I suggest from FTP, although you can do it from database as well). This is how you do it:

navigate to /wp-content folder (it will be within your website root, assuming you did not install WordPress in subfolder).
rename the /plugins folder to anything you want, as this will disable all the plugins.
I would call this quick and dirty approach which eliminates (or not) the possibility of a plugin error which is ultimately causing the website to crash.

If this doesn’t help, you will need to debug your website using WP_DEBUG PHP constant. You will find it within wp-config.php file, which exists in the WordPress root folder. By default it is set to false, but you will want to set it to true so you could see the error messages. Once you do this, reload your website and you will likely see some error messages (such as fatal errors) that brought your website down.

If you’re having trouble understanding what these messages means (and how to resolve them), you’re free to use Codeable where any of our experts will get your website online quickly.