How to fix the white screen of death in WordPress

Fix the WordPress White Screen of Death: 9 Possible Solutions

When browsing your WordPress website, few things are more troubling than the White Screen of Death. This common error makes your site inaccessible to both administrators and common visitors.

In this post, we’ll go over what the White Screen of Death is, and what is likely to cause it. You will learn 9 potential fixes to help you get your site back up and running ASAP.

If you’re looking for quality shared hosting for your WordPress website, we highly recommend A2 Hosting. They offer unlimited SSD space, free automatic site backups, hosting optimized for speed and 24/7/365 guru technical support.

What is the White Screen of Death in WordPress?

As its name suggests, the White Screen of Death shows you a white, blank screen instead of your amazing website. You will see different messages depending on the browser you’re using.

Google Chrome – You could get a HTTP Error 500 which reads “This page isn’t working.”

Mozilla Firefox – In this popular browser, you will simply see a blank, white screen with no warning or error messages.

In the vast majority of cases, the WordPress White Screen of Death is caused by PHP code errors or exhausted memory limits.

A faulty theme or plugin can also be the culprit behind this annoying error. If the front end of your site is down, but you can still log in to your dashboard, this may be the case. You can quickly check to see if your admin area is working by going to yoursite.com/wp-admin/.

How to fix the WordPress White Screen of Death

Now that you know what the White Screen of Death is, let’s see how you can fix it. We’ll go over nine potential solutions to help you get your site get back online.

1. Disable all WordPress plugins temporarily

To rule out a plugin issue as the cause of your error, you should disable all of your WordPress plugins and see if the problem persists. Whenever you’re having problems with your site, this is a great first step.

You can easily disable all plugins within your WordPress dashboard by going to Plugins in the left sidebar, selecting all of them, choosing Deactivate from the Bulk Actions dropdown and clicking the Apply button.

Deactivate all plugins

With all of your plugins disabled, see if you can access the front end of your site. If so, you should re-activate your plugins one by one, reloading your website after each re-activated plugin.

Keep up this process until you find the culprit. Once you do, you obviously want to deactivate the problematic plugin. You can also reach out to the plugin developer to let them know about the problem or post a support ticket under the given plugin in the WordPress plugin directory.

2. Switch to the default WordPress theme

Once you’ve ruled out a plugin causing the problem, the next step is to switch to the newest default WordPress theme (currently it’s Twenty Twenty).

If you have access to your WordPress dashboard, go to Appearance > Themes in left sidebar. Locate the default theme and click the Activate button.

Activate default WordPress theme

As soon as you’ve done this, visit the front end of your site to see if it works. If you’re able to access your site normally after switching themes, you know that there is an issue with the theme you were using.

If you’re unable to access your dashboard, you can easily switch to the default theme via ftp or cPanel. Simply access your site’s files and rename your wp-content/themes folder to something else (I usually just add a number to the end).

Since you’ve deactivated the themes folder, WordPress will revert to the latest default theme. Then, you can see if your site works on the front end.

If your site works, you can additionally try to install a different theme from the WordPress theme directory by uploading it to your themes folder. Then, you can see if that theme works.

Once you’ve found out that it’s a conflict with the theme you were using, you can reach out to the theme developer to see if they have suggestions for troubleshooting the issue. You could also simply consider selecting a different theme.

3. Clear your browser cache/history and purge your WordPress plugin cache

Are you able to access the WordPress dashboard but see the white screen on the front end? This could be due to a problem with your cache.

The first thing you can do is to clear your browser cache. In Chrome you do this by going to History under the vertical dots on the top right of the browser window.

View browser history in Google Chrome

Then click Clear browsing data on the left side of the next screen.

Clear browsing data in Google Chrome

Finally, click the Clear data button and see if it’s solved your problem.

Clear data in Google Chrome browser

If you’re using a caching plugin to help speed up your WordPress site, then you’ll also want to clear the cache for that.

Below, you’ll find some methods for clearing the cache using popular caching plugins:

WP Rocket – Go to Settings > WP Rocket and click the Clear Cache button under the Dashboard tab.

W3 Total Cache – Under Performance in the left sidebar, click on Dashboard followed by the empty all caches button on the next screen.

WP Super Cache – In Settings, go to WP Super Cache and then click the Delete Cache button.

4. Turn on debugging mode

If you’ve tried all the methods above and are still seeing the white screen of death or the WordPress dashboard is not working, you can enable debugging mode to display any errors occurring on your site.

In order to enable debugging, you’ll need to open up the wp-config.php file (either through ftp or in file manager within cPanel).

Locate the following line:

define( 'WP_DEBUG', false )

Then, change the word “false” to “true” and reload your site. If for some reason the line of code is missing, you can add it to the top of the file.

Now, even if you’re seeing the white screen, you’ll also see error messages that give you some details about what’s wrong.

Cannot redeclare get_posts() (previously declared in 
/var/www/html/wordpress/wp-includes/post.php:1874) in 
/var/www/html/wordpress/wp-content/plugins/my-fab-plugin/my-fab-plugin.php on line 38

This can be helpful in letting you know the source of the problem, whether it’s a plugin or something else.

5. Increase your site’s PHP memory limit

Still no luck fixing the white screen of death on your WordPress site? It could be due to the PHP memory limit.

You can easily increase the memory a couple different ways:

wp-config.php – Open up your wp-config.php file and add the following code:

define('WP_MEMORY_LIMIT', '64M');

.htaccess – Locate your .htaccess file, then open it and increase the memory limit by adding the following:

php_value memory_limit 64M

php.ini – Connect to your site via FTP or File Manager in cPanel, then locate the file and open it. Add the following code:

memory_limit = 64M

6. Check for failed or stuck WordPress updates

As I wrote in my tutorial about fixing WordPress stuck in maintenance mode, sometimes making updates breaks your site. This could be due to a server timeout or other temporary problem.

To check if this is the case, take a look in the WordPress root directory to see if there’s a .maintenance file there. If so, you should delete it and try re-loading your site.

Temporary maintenance file in root directory

In the case that an update was successful, but WordPress failed to remove this file automatically, deleting it should restore your site. On the other hand, if the update was not completed, it may restart automatically, which should also make things go back to normal.

In the case that the neither of the above work, follow the manual update procedure for WordPress to solve the issue.

7. Check file permissions

It is possible that there are permission and/or ownership issues causing the white screen of death on your WordPress site. Troubleshooting this is tricky as you likely don’t know which file permissions should be set for each file in a WordPress install.

If you set the incorrect permissions for files or folders, you can create unwanted vulnerabilities that hackers can exploit.

As far as WordPress permissions go, the following three rules should be adhered to:

  • All files should be set to 644 or 664
  • Folders should be set to 750, 755 or 775
  • The wp-config.php file should be set to 644 or 660

With SSH server access, you can apply the correct rules using the following command within the WordPress directory:

sudo find . -type f -exec chmod 664 {} +
sudo find . -type d -exec chmod 775 {} +
sudo chmod 660 wp-config.php

If you’re weary about doing technical stuff yourself, you should ask your web host for help with it.

8. Fix syntax errors or restore from a backup

Another possible cause of problems on your site is when you’re editing code on your site and use the wrong syntax or mistype something.

Using a single character in the wrong spot could break your entire site. Fear not, as it is pretty easy to fix any problems you created. If you have access to ftp or File Manager within cPanel, you can locate the file you changed and easily undo what you did.

If your host has automated daily backups, you can also restore to a backup taken before you broke the site.

9. Increase PHP text processing ability

If you’re still unable to solve the white screen of death issue, there’s one last trick you can try. In rare cases, the problem might stem from page or post content that is rather long.

You can adjust the PHP text processing ability on your site by increasing the backtrack and recursion limits. All you need to do is paste the following code in your wp-config.php file:

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

As soon as you add this code, save the file and see if your WordPress site is working again.

Conclusion

All errors on your WordPress site can be really frustrating, including the White Screen of Death. While it’s annoying, it can usually be fixed relatively easily.

In the majority of cases, a simple theme and/or plugin check can get your site back up and running. If you get stuck, using WordPress debug mode will help give you more info on the problem. If you get stuck and can’t seem to solve the problem, your web host may be able to help or at least point you in the right direction.

Have you had any experiences with the White Screen of Death on your WordPress site? If so, please let us know in the comments below.


If you found this post helpful, please share it and spread the word!

Want more like this? Sign up for my newsletter to receive helpful WordPress Tutorials, Tips and Tricks.

Leave a Comment

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

 

Scroll to Top