The WordPress white screen of death is one of the most common WordPress errors and it’s very frustrating too because, the browser is only showing a blank white screen without any error message, and you are locked out of WordPress.
This error becomes more frustrating when it affects only specific parts of web pages.
For example, you are seeing the white screen inside the WordPress Dashboard only but your website is working fine. In other cases, it may appear on a specific post but works fine elsewhere.
There are a few ways to fix the white screen of Death and this article will guide you on how to fix WordPress’s white screen of death by looking at different solutions step by step.
Also, in this article, we will try to figure out the specific cause for the error and once you know the specific cause behind this error, we will discuss some tips to prevent this WordPress blank page issue from ever happening again.
What Causes the WordPress White Screen Of Death Error?
The most common cause behind the WordPress white screen of death is:
Memory Limit Exhausted: The PHP scripts of your websites have exceeded the memory limit or the maximum execution time. The unresponsive scripts are being killed by the hosting server or show the times out. This is the reason why no error is shown and you get a plain screen.
Outdated/Incompatible plugins: Sometimes outdated plugins or Poorly coded plugins show a white screen of death on users’ browsers or the message “There has been a critical error on your website”, it’s the same.
Corrupted themes: Current theme or active theme is not compatible with the WordPress version.
Corrupted core files: Error or wrong coding in the core files, such as wp-config.php, .htaccess, index.php, and functions.php can corrupt a site and may result in a White Screen of Death Error.
Any of the situations mentioned above can cause your website or its specific post or web page to show a blank white screen.
How to Fix the WordPress White Screen of Death
To fix the White Screen Error of Death, you need to figure out the source of the error first. Some common methods to fix the errors are:
- Retrace your steps: Check out the recent changes made by you on your website before your website shows a blank screen. Try to undo the changes and hard reload your website to see if the error is fixed or not.
- Check your email: Check your wp-admin email to see if you have received a notification from WordPress regarding the error.
If the method mentioned above doesn’t solve your problem, it means it requires methodical troubleshooting to fix it.
Is the problem occur on your other sites too?
If you have hosted other WordPress websites as well on the same server, then you must check if the problem is occurring on other sites as well.
If you are having the same problem on other sites too, it simply means there is something wrong with your WordPress hosting services. You can contact the support regarding the issue for better help.
But if the problem is with one website only or some specific part of that site, then you know that the problem is with that particular website and it must be fixed.
Check WordPress Core Files
The first method is to check your WordPress website’s core files because a wrong line of code or a missing core file can corrupt a website.
- Go to File Manager → public_html directory.
- Make sure that files like .htaccess, index.php, wp-config.php and other core files(default WordPress files) are present. If files are not there, download new WordPress installation files from the official WordPress website and add the missing files to the File Manager.
- Check for corrupt core files. If you have recently made changes to any of the core files, undo the changes first and save the files. Hard reload(Ctrl+Shift+R) your web page to see if the WordPress white screen of death is resolved or not. If resolved – those changes were causing the problem.
If that is the case, replace the corrupted file with a new one using the WordPress installation file which you have downloaded.
Increase WordPress Memory Limit
WordPress’s default memory limit is 32 MB. It may be that there are some large scripts(s) that have exhausted the memory and quit the process in the middle. To fix this issue, you need to increase the memory limit following which will allow the script(s) to use memory to complete the job.
Follow the steps below to modify the Memory Limit in DirectAdmin and cPanel
- Go to the File Manager → public_html directory of your domain.
- Edit wp-config.php.
- Locate the line:
/* That’s all, stop editing! Happy blogging. */
- Add the following line above it:
- Click Save and Close the file.
- Reload your webpage to see if this has fixed your White Screen error or not.
Disable All plugins
If increasing the memory limit didn’t solve the problem, then we need to move to the next step of troubleshooting.
As per our issue troubleshooting experience, we have found that the issue is either with a specific plugin or theme most of the time. So let’s disable all the plugins.
You can disable the plugins from WordPress Dashboard → Plugins → Installed Plugins page.
Select all the installed plugins and then select Deactivate under the Bulk actions drop-down.
If you do not have WordPress access, you can deactivate all the plugins via File Manager → public_html →wp-content and rename the plugins directory or you can follow the same path using FTP as well.
WordPress will look for the directory named plugins to load all the plugins and when the directory can not be found, it simply deactivates all the plugins.
If deactivating all the plugins fixes the issue, then the plugins one at a time to get to the bottom of the issue and once you identified the plugin causing the issue, you can remove the plugin or replace it with an alternative.
Check Themes and replace them with Default Themes.
If disabling all the plugins didn’t help, then you should try replacing your current theme with a default theme.
For enabling the default theme, log in to your WordPress Dashboard →Appearance →Themes pages. Activate Twenty Twenty-Two theme or any other default theme you are having.
Although you can switch themes from your WordPress dashboard, you can change the theme on the phpMyAdmin→ wp_options table as well will also help disable the current theme file.
You will see your current theme name under the option_name column. Edit the values of the template and stylesheet and change them to twentytwentytwo.
Reload the site to check if the error is resolved or not. If this method resolved the issue, use an alternative theme or just delete and reinstall the current theme again.
Enable Debug Mode to Catch Errors in WordPress
If the issue hasn’t been solved so far, turn on the debugging mode in WordPress which allow you to see what type of error is being shown on the website.
Just edit your wp-config.php and the following code.
|define( ‘WP_DEBUG’, true);|
define( ‘WP_DEBUG_LOG’, true );
After adding the code, reload the blank screen and now your blank screen will have errors, notices, and warnings which may help you figure out the root cause.
If still, you are having a white screen, you need to check the debug.log. Visit the wp-content directory from either File Manager or FTP client and there you will find a new debug.log file which will have the log of all the warnings, notices, and errors.
Clear the WordPress Cache
Sometimes, caching plugins can cause the front end of the site to have the white screen of death while the back end is accessible.
Please refer to How to clear cache in WordPress for detailed instructions.