Memory exhaustion is one of the most common reason behind white screen of death error. To fix this, you will need to increase the memory limit in WordPress. Open wp-config.php file located under WordPress directory, add following line in wp-config.php and save the file.
If you still get this error after above fix, you will have to extend the PHP memory limit from php.ini file. You can also contact your web host to increase the PHP Memory limit.
Troubleshooting with WP_DEBUGWP_DEBUG is the handy way to determine the problem with your WordPress website. When debugging mode is turned on, you will have list of errors and warnings. To turn on WP_DEBUG in local WordPress website, just 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. */
In case WP_DEBUG code already exists in wp-config.php file, just set it to true. Placing this code in live website is not recommended since it will print all errors, warnings, website path including other possible sensitive information. When you want to turn on debugging mode in live website, add following lines of code to wp-config.php file above the Happy blogging line. Following code will enable the debugging on and save the error messages to 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. @ini_set('display_errors',0);
Once you add above code block to wp-config.php file, the blank screen will now have errors, warnings and notices which will be helpful to determine the exact cause.
2-Deactivate All Plugins Through cPanel
- Login at cPanel, Under Files section, Go to File Manager.
- Select Web Root (public_html/www) and click Go.
- Expand the public_html folder, and navigate to the /wp-content/plugins folder.
- Right click on the /wp-content/plugins folder and rename it like plugins.old. This will deactivate all of the plugins at once.
- Now, reactivate plugins folder again by renaming back to plugins. This will allow you to access the WordPress Dashboard again.
- If white screen disappears from your website, activate plugins one by one until the white screen comes back. When it does, you’ll know the culprit plugin.
3-Switch to Default WordPress Theme
If the plugin disabling doesn’t work for you, switch back to default twenty fifteen theme. Access to the WordPress directory either 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 theme changing fixes your issue, check your theme’s functions.php file. If you see any extra spaces at the bottom, then you can fix it by replacing a working version of functions.php. You may find a working version of functions.php file from the backup you might taken prior to making changes or from the original version that came with your theme. If you are good at coding you can also manually remove any unusual code from the functions.php.