Md Obydullah Follow I'm Md Obydullah. I build open-source projects and write about Laravel, Linux server, modern JavaScript and web development.

How to Solve the WordPress White Screen of Death

Last modified on March 9, 2019 2 min read

If you are a frequent user of WordPress, then we are certain that you have suffered the wrath of the white screen of death. This error kicks you off from WordPress admin panel and allows you zero access. The screen displays no error, and you wonder what in the world went wrong.

This screen doesn’t necessarily show on the entire website, it could root itself onto a certain area. If you are seeing it in your admin panel, chances are that every other page on the site is running perfectly.
We have managed to figure out the solutions for this white screen, and we will discuss them with you in this article.

Note: Have ample backup, before you try changing anything.

Reason of this error

If the memory limit gets exhausted by a faulty plugin, or if you use improperly coded themes, this can result in the white screen of death. It could arise from a problem in the web hosting server. To figure out the root cause of the problem, one should do a significant amount of troubleshooting.

Does this issue occur on other sites?

If you are running a variety of websites, you should ensure whether is screen is spread across all the websites or just a single one.

If the problem is widespread, it means that the web hosting provider is encountering an issue. If the problem is at a single site, it means that a theme or a plugin is defective. If the problem is limited to a single page or a post, then the issue is on the specific site.

Increase the memory limit

Most of the times when the memory becomes exhausted, this issue arises. Read our article on how to increase PHP memory in WordPress.

Disable all plugins

If the above solution was unsuccessful and you possess a very high memory limit, typically 512M or 256M, then it means that the problem is occurring in a specific theme or a plugin. Now deactivate all plugins at once. If the problem gets resolved then enable the plugin one by one to discover the faulty plugin.

Replace your theme with a default theme

If none of the above solutions are helping, then replace the current theme with a default twenty ten theme. Follow these simple instructions to make the replacement:

1. Back up the theme folder
2. Delete the current theme
3. WordPress will immediately switch to a default theme

Or you can:

1. Visit phpmyadmin
2. Update the contents of wp_options table
3. Update the given names; stylesheet, current theme and template.
4. Change them to twentyeleven
5. Look at theme’s functions.php file
6. Fix the bottom most extra spaces.

This issue can also be caused by an improperly coded theme used in functions.php file.

Some more solutions

After many unsuccessful attempts, you should fix this issue by downloading and reinstalling a new copy of WordPress.

The WordPress debug function can tell you what errors are occurring, so you can use this function to troubleshoot the error. Add the mentioned code in wp-config.php file.

error_reporting(E_ALL); ini_set('display_errors', 1);
define( 'WP_DEBUG', true);

After the addition of these lines the white screen will display the notices, errors and warnings, which can lead you to discover the source of the problem.

If the problem is showing up on only the front-end of the side, it means that the caching plugin is not running correctly. If the problem is occurring merely on a page having a long post, then both of these issues have the same solution; just empty the cache to get rid of the problem.

If the error is still there, we need to increase backtrack and recursion limit. Paste this code in your wp-config.php file or in other server’s case, the PHP.ini file.

/** Trick for long posts */
ini_set('pcre.recursion_limit',20000000);
ini_set('pcre.backtrack_limit',10000000);

We hope that this cumbersome error was resolved by our help.

You're welcome to suggest any article to write!

Md Obydullah Follow I'm Md Obydullah. I build open-source projects and write about Laravel, Linux server, modern JavaScript and web development.

Leave a Reply

Your email address will not be published. Required fields are marked *