How to fix WordPress blank white screen of death

How to fix WordPress blank white screen of death: Troubleshooting and Debugging

WordPress blank white screen of death is commonly encountered error and it gives admin blank page as well as front end with blank white screen leaving developer in blank state and its easy to fix by performing simple troubleshooting for WordPress for plain white screen by enabling errors and debugging WordPress website.

Troubleshooting the Blank White Page (Screen of Death):

On most web hosts, PHP errors are logged rather than printed to the screen. This is good security; it prevents you from accidentally exposing your database password or other sensitive information if you mess up your code. However, this feature also prevents you from seeing what’s gone wrong if there was a problem during your installation. Instead of a login screen, you’ll just see a blank white page.

If you know where your PHP error log is, you can check its last line to see what the problem was. If you don’t know where the log is, you can check your web host’s documentation to find out, or you can simply turn on the error display until you resolve the problem. WordPress will not display your database connection information even if there is an error.

To display errors, find the wp-config.php file in your WordPress directory. Look for the WP_DEBUG constant, below your database settings. Change it from false to true.

Debugging with wp-config.php (Partial):

// ** MySQL settings - You can get this info from your web host ** //

/** The name of the database for WordPress*/

define('DB_NAME', 'my_wp_db');

/** MySQL database username */

define('DB_USER', 'my_wp_db_user'); define('WP_DEBUG', true);

Once enabled, Go back and refresh your site again, and you should see the problem. Ignore any warnings and notices, and look for fatal errors. Is there an unknown function? Look for a missing file, or simply re-upload the entire WordPress package.

Related Coverage:

1. WordPress Debug log: Enable in wp-config.php, SET to True & SET Log path file

2. Learn Everything About wp-config.php File WordPress

3. Template Tags in WordPress and Uses

4. WordPress Error Establishing Database Connection

The error message you would see if one of the files from wp-includes were missing in this case, capabilities.php. The first message, a warning, could be safely ignored, but in this case it provides us with a clue as to why the second error occurred. The fatal error is the showstopper. Resolve that problem, and WordPress should work correctly now.

When you’ve solved the problem, switch the value of WP_DEBUG back to false.

Fatal Error Due to a Missing File leads to WordPress Blank screen of Death

Warning:

require(/Users/folder/domain/wp/wp-includes/capabilities.php): failed to open stream: No such file or directory in /Users/folder/domain/wp/wp-settings.php on line 108

Fatal error:

require(): Failed opening required ‘/Users/folder/domain/wp/wpincludes/capabilities.php’ in /Users/folder/domain/wp/wp-settings.php on line 108

You can also log errors instead of displaying them on the screen. This is especially useful when you begin developing your own themes and plugins. To log errors, add the WP_DEBUG_DISPLAY and WP_DEBUG_LOG constants to your configuration file.

Turning on Error Logging in wp-config.php (Partial):

// ** MySQL settings - You can get this info from your web host ** //

/** The name of the database for WordPress */

define('DB_NAME', 'my_wp_db');

/** MySQL database username */

define('DB_USER', 'my_wp_db_user');

define('WP_DEBUG', true);

define('WP_DEBUG_LOG', true);

define('WP_DEBUG_DISPLAY', false);

See the Codex (the WordPress documentation wiki) page on wp-config.php here: https://wordpress.org/support/article/editing-wp-config-php/ for more debug log options and PHP configuration settings that might help with debugging.