White Screen of Death is one of the most common WordPress errors that results in a blank white screen when you visit your blog/ website.
It leaves no clues as to what is causing it, which can be intimidating if you are new to WordPress and have no knowledge of troubleshooting a WordPress website. It can get even worse when it affects only specific web pages.
The white screen of death WordPress error is usually a sign of a PHP fatal error. An unresponsive script that has exhausted the allocated memory limit and gets killed by your web hosting server.
This error can also happen when you install a poorly coded plugin or theme on your WordPress installation. Other times it can be caused by your web hosting server.
Having said that, like any other WordPress error this error, the white screen of death error can be solved in a few simple steps…
NOTE: Before proceeding with any changes, make sure that you’ve generated a full backup of your website.
1. Increasing the Memory Limit
We had seen earlier that this error can be caused by insufficient memory, let’s deal with that. By default, WordPress allocates 32 MB but you can increase it if need be.
Head over to the wp-config.php file in the root directory of your WordPress installation using an FTP client or cPanel if available. Edit and add this code:
Save the file and refresh your website to see if the white screen of death error is fixed. If it did congratulations, and pat yourself on the back for a good job.
If it did not, don’t panic we have more… Just read on.
2. Disable all plugins
Try this step if you have a high memory limit like 256M or 512M and the error persists. Let’s get to troubleshooting now…
If you can access the WordPress dashboard go to Plugins > Installed Plugins, select all of them, and using ‘Bulk Actions’ select ‘Deactivate’ in the dropdown menu.
If you can’t access the dashboard go to the plugins directory using FTP or a file manager app like cPanel, and in the root directory go to wp-content > plugins and rename the directory to something like plugins_backup. This deactivates all plugins.
Try to reload your site and if it fixes the issue, activate the plugins one by one to find out which one of them is causing the White Screen of Death WordPress error. You can replace the faulty plugin with a good one or use an alternative plugin.
3. Replace Theme with a Default Theme
If the 2 steps so far haven’t sorted your issue just read on…
If you can access the WordPress dashboard you can head over to Appearance > Themes and select a default WordPress theme.
If you can’t access the dashboard you can access the themes directory via FTP or a file manager app like cPanel, and in the root directory go to wp-content > themes and rename the directory for the theme you are using. Doing this forces WordPress to set the default theme; if it’s not there, it is installed and set as the default theme.
Reload your site and see if it solves the issue. If it did check your themes functions.php file for any space at the beginning or end of the file and remove them. If it doesn’t work you need to get a fresh copy of your theme and re-upload it.
4. Switch on Debugging Mode
If nothing has helped so far, then the next step is to turn on debugging in WordPress. This will allow you to see what type of errors are being outputted.
Head over to wp-config.php, open it, and find the following code:
define( 'WP_DEBUG', false );
Edit ‘false’ to ‘true’. The screen will also give instructions on how to solve the problems. Make sure to change the WP_DEBUG line’s value back to false once you have fixed the issue.
5. Clear cache
If you are still experiencing White Screen of Death, you should try flushing WordPress caching plugins. If you do not have access to the WordPress dashboard, clear your browser cache.
As the name suggests, the White Screen of Death WordPress error can cause you to fall into a panic frenzy, but it’s quite easy to fix. Some of the most common causes are PHP errors, incompatible plugins or themes, and corrupt files.
The best ways to figure out the exact cause are to retrace your steps, check for any error notifications on your admin email, or use an inspect element feature.
Once you know what causes the error, follow the appropriate method to fix it. Happy Debugging!!!