How to Fix White Screen of Death Error in WordPress?

Anyone involved in WordPress development must have faced the annoying white page without any error message. Such a blank screen with no additional information is commonly known as the WordPress White Screen of Death (WSOD) in the WordPress community. WordPress developers find this error most frustrating because it does not print PHP errors, so you can have tips for fixing it. Additionally, it will lock you out from accessing the WordPress dashboard.

Several things can cause WordPress white screen of death error – recently added/updated plugins, manual changes in the functions.php file, issues with a web server, poorly coded theme, and memory exhaustion in the WordPress website, to name a few. 

This article will discuss various causes of the WSOD error and its possible solutions.

The WSOD Errors

As said earlier, memory exhaustion is one of the most common reasons behind the white screen of death error. To fix this, you will need to increase the memory limit in WordPress. You will need to open the wp-config.php file located under the WordPress directory, add the following line in wp-config.php – 

define('WP_MEMORY_LIMIT', '128M');

Then save the file.

If you still get this error after this fix, you will have to extend the PHP memory limit from the php.ini file. You can also contact your web host to increase the PHP Memory limit.

Troubleshooting with WP_DEBUG

WP_DEBUG is a handy way to determine the problem with your WordPress website. When debugging mode is turned on, you will have a list of errors and warnings.

To turn on WP_DEBUG in the local WordPress website, add the following line of code to your wp-config.php file –

define( 'WP_DEBUG', true );

Make sure you place this line above the following line –

        /* That's all, stop editing! Happy blogging. */

Set it to true if the WP_DEBUG code already exists in the wp-config.php file. 

Placing this code on a live website is not recommended since it will print all errors, warnings, and website paths, including other possibly sensitive information. When you want to turn on debugging mode in the live website, add the following lines of code to the wp-config.php file above the Happy blogging line to enable debugging and save the error messages to the private log file –

// This will turn on the debugging.

define('WP_DEBUG', true);

// This will log everything at /wp-content/debug.log file.

define('WP_DEBUG_LOG', true);

// This will not print the error message on your website.

define('WP_DEBUG_DISPLAY', false);

//This will hide the errors from being displayed on-screen.


Once you add the above code block to the wp-config.php file, the blank screen will now show errors, warnings, and notices which will help determine the exact cause

Try Disabling All Plugins and Theme

Increasing the memory limit does not fix your issue; perhaps the issue lies with the specific plugin or theme. To filter out plugin-specific issues, you will have to disable all the plugins at once and activate them one by one by implementing the following steps –

To deactivate all the plugins through cPanel

  1. Log in to cPanel
  2. Under the Files section, go to File Manager.
  3. Select Web Root (public_html/www) and click Go.
  4. Expand the public_html folder and navigate to the /wp-content/plugins folder.
  5. Right-click on the /wp-content/plugins folder and rename it to plugins.old.
    This will deactivate all of the plugins at once.
  6. Now, reactivate the plugins folder again by renaming it back to plugins.
    This will allow you to reaccess the WordPress Dashboard.
  7. If the white screen disappears from your website, activate plugins one by one until the white screen returns. 
  8. When it does, you'll know the plugin causing the issue.

Switch to Default WordPress Theme

  • If the plugin disabling doesn't work for you, switch back to the default twenty-fifteen theme. Then, access the WordPress directory through cPanel or FTP, navigate to wp-content/themes, locate the theme folder you are using, and rename it.
    WordPress will automatically fall back to the default theme.
  • If changing the theme fixes your issue, check your theme's functions.php file.
  • If you see any extra spaces at the bottom, you can fix them by replacing a working version of functions.php.
  • You may find a working version of the functions.php file from the backup you might have taken before making changes or from the original version that came with your theme.
  • If you are good at coding, you can manually remove any unusual code from  functions.php.

Was this answer helpful?

« Back