If you have been using WordPress for a few years, then you have encountered the white screen of death at least once. The reason why this issue is frustrating for users is because it locks you out of your WordPress admin panel. Because there is no error output in most cases, you are left clueless to figure out what is the issue. The worst thing about white screen of death is that sometimes it will only affect a certain part of your site. For example, you may only see the white screen of death on your WordPress admin while everything else works fine. In other cases, you may only see it on a specific post whereas everything else runs just fine. In this article, we will show you how to fix the WordPress white screen of death by looking at a few possible solutions.
Note: Before you make any changes to your site, make sure you have sufficient backups.
Why do you get this error?
Majority of the time when you see a white screen of death, it means that you exhausted the memory limit.
We’ve created a list with some additional errors:
- A plugin that you may be using that is not functioning properly.
- A poorly coded theme that you are using.
- An issue with your web hosting server.
Since the problem can be caused by any number of things, it may require a lot of troubleshooting.
Does the problem occur on your other sites?
If you have multiple sites, then the first thing you should do is to make sure that the white screen of death is happening across the board or just on this one domain. If the issue is with all of your sites, then it is a strong indicator that your web hosting provider is having some issues. However, if the issue is only with one of your sites, then this could be an issue with a plugin or theme that you are running. If the issue is only happening with a single post or page, then you know it is definitely a problem with your specific site.
Increasing the Memory Limit
Usually this issue happens because your memory is being exhausted. Use our tutorial on how to increase PHP memory in WordPress.
Disabling All Plugins
If increasing the memory limit did not help, or if you have a high memory limit like 256M or 512M, then you need to start troubleshooting. In our experience of troubleshooting this issue, we have always found that the issue is either with a specific plugin or a theme. Let’s go ahead and disable all the plugins.
Replace Theme with a Default Theme
If the plugin troubleshooting doesn’t fix the issue, then you should try replacing your current theme with a default twenty ten theme. The best way to do this is by backing up your theme folder. Then deleting the theme. WordPress will automatically fall back to the default theme.
Alternatively, you can go in your phpMyAdmin and update the database tables in wp_options table. The following table names would have to be updated:
template, stylesheet, and current_theme. Change the value to twentyeleven.
If this fixes the issue, then you should look at your theme’s functions.php file. If there are extra spaces at the bottom, then you should consider fixing it. If you are using a poorly coded function in your theme’s functions.php file, then it can cause this as well.
If none of the above fixes it, then you should try to re-install a fresh copy of WordPress. While it is unlikely, but it is always possible that a core file may have been corrupted.
You can also use the WordPress debug function to see what type of errors are being outputted. Add the following code in your wp-config.php file.
error_reporting(E_ALL); ini_set('display_errors', 1); define( 'WP_DEBUG', true);
Once you add this, the blank screen will now have errors, warnings, and notices. These may be able to help you determine the root cause.
Sometimes, you may have access to the backend, but the front-end of the site has white screen of death. This can happen because of a caching plugin. Simply empty your cache.
If you have a white screen of death only on a very long post page, then you should also try to clearing cache. Another trick that we have found to work is increasing the recursion and backtrack limit. You can paste the following code in your wp-config.php file. Or in some servers you will be required to modify your PHP.INI file.
/** Trick for long posts */ ini_set('pcre.recursion_limit',20000000); ini_set('pcre.backtrack_limit',10000000);
We understand that this is a very frustrating error, and we hope that one of the tricks above fixed the issue for you.