How to Fix the WordPress White Screen of Death (Step by Step)

The WordPress white screen of death is one of the most common WordPress errors. It is also a frustrating error because there is no message, and you are locked out of WordPress.

Another problem with the white screen of death error is that sometimes, it only affects a certain part of your website. For example, you may only see the white screen of death inside the WordPress admin area, while everything else works fine. In other cases, you might only see it on a specific post.

In this article, we will show you how to fix the WordPress white screen of death by looking at different solutions.

How to Fix the WordPress White Screen of Death (Step by Step)

Note: Before you make any changes to your site, make sure you have a backup of your WordPress site. If you don’t have access to the admin area, then see our guide on how to manually create a WordPress database backup.

Why Do You See the White Screen of Death in WordPress?

The majority of the time, when you see a white screen of death when trying to visit your WordPress website, it means that a script on your website exhausted the memory limit.

The unresponsive script either gets killed by your WordPress hosting server or simply times out. This is why no actual error message is generated, and you just see a plain white screen.

WordPress showing white screen instead of website

However, sometimes, you may see an error message.

For example, you might see a critical error message instead of a plain white screen.

Critical error in WordPress

Whether you are seeing a blank screen or the message ‘There has been a critical error on your website’, it’s the same error.

This error can also happen due to a poorly coded theme or plugin installed on your site. Sometimes, it can happen if there is an issue with your web hosting server.

Since the white screen error can be caused by any number of things, it requires methodical troubleshooting to fix it. Here are the steps you should try:

Video Tutorial

If you’d prefer written instructions, then just keep reading.

1. Check Whether the Problem Happens on Your Other Sites

If you have other WordPress sites installed on the same hosting account, then you want to start by checking if the problem is happening on other sites as well.

If it is, then that’s a strong indicator that something is wrong with your WordPress hosting service. This could be a temporary issue affecting their service, and you need to reach out to their support for more help.

On the other hand, if the issue is only happening with one website or a specific part of that site, then you know that the problem is with that particular website.

2. Fix the White Screen Error With WordPress Recovery Mode

If the white screen of death error is caused by a WordPress plugin or theme, then WordPress may be able to catch it.

The new fatal error protection feature introduced in WordPress 5.2 can sometimes catch the error, so you may not even see a white screen. Instead, you will see a message that the site is having technical difficulties.

This Site Is Experiencing Technical Difficulties Error Message

WordPress will also send an email about the problem to your admin email address.

The email will have the subject ‘Your Site is Experiencing a Technical Issue’.

Technical Difficulties Email With Link to Recovery Mode

This email message will point out the plugin or theme causing the error, and it will also contain a special link.

This link will allow you to log in to the WordPress recovery mode and deactivate the faulty plugin.

WordPress recovery mode dashboard

However, if you are seeing the plain white screen of death with no email or recovery mode option, then you need to manually fix the error.

3. Increase the Memory Limit

Usually, this error happens because a script has exhausted your web server’s memory and quit in the middle.

To fix this, you need to increase the PHP memory available to WordPress. This will allow the script to use more memory to finish the job it was supposed to do.

You will need to edit the wp-config.php file on your WordPress site or use a code snippet plugin like WPCode

You can follow the instructions in our tutorial on how to increase PHP memory in WordPress.

4. Fix the White Screen Error by 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.

If you can still access the WordPress admin area, then you can simply go to the Plugins » Installed Plugins page. Select all the installed plugins and then select ‘Deactivate’ under the ‘Bulk actions’ dropdown.

Deactivate all WordPress plugins

However, if you don’t have access to the WordPress admin area, then you will need to deactivate all plugins via FTP.

First, connect to your WordPress site using an FTP client. Once connected, go to the wp-content folder, where you will see the plugins folder.

Now, you need to right-click on the plugins folder and then select ‘Rename’. You can rename the plugins folder to ‘plugins-deactivated’.

Using FTP to Rename the Plugins Folder

WordPress looks for a folder named plugins to load all plugins. When it cannot find the folder, it simply deactivates all plugins.

If this fixes the issue, then enable one plugin at a time to get to the bottom of the issue. Once you find the plugin causing the issue, you can replace it with an alternative or report the issue to plugin authors.

5. Activate the Default Theme

If the plugin troubleshooting doesn’t fix the issue, then you should try replacing your current theme with a default theme.

First, connect to your website using an FTP client and go to the /wp-content/themes/ folder. It contains all installed themes on your website.

Right-click to select your current WordPress theme and download it to your computer as a backup.

Using FTP to Download the Current Theme as a Backup

Next, you need to delete your current theme from your website.

Simply right-click on your theme folder and select ‘Delete’. Your FTP client will now delete the theme from your website.

Using FTP to Delete the Current Theme

Now, if you have a default WordPress theme like (Twenty Twenty-Two or Twenty Twenty-Three) installed on your website, then WordPress will automatically start using it as the default theme.

However, if you don’t have a default theme installed, then you need to manually install it using FTP.

If this fixes the issue, then you should look at your theme’s functions.php file. If there are extra spaces at the bottom of the file, then you need to remove those, and sometimes that fixes the issue.

If you are using a poorly coded function in your theme’s functions.php file, then it can cause the white screen of death error as well.

Consider downloading a fresh copy of your theme from its source and then installing it manually using FTP.

6. Enable Debug Mode to Catch Errors in WordPress

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.

Simply add the following code to your wp-config.php file:

define( 'WP_DEBUG', true);
define( 'WP_DEBUG_LOG', 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.

If you don’t see any errors, then you may still want to check the debug log.

Simply visit the wp-content folder on your website using an FTP client. There, you will find a new debug.log file containing a log of all errors, notices, and warnings.

Debug log

7. Clear the WordPress Cache

Sometimes, you may have access to the backend, but the front end of the site has the white screen of death.

This can happen because of a caching plugin. In that case, you simply need to empty your WordPress cache.

You can see our guide on how to clear the cache in WordPress for detailed instructions.

8. Fix the White Screen Error for Longer Articles

If you have a white screen of death only on a very long post or page, then this method might work.

This trick basically increases PHP’s text processing capability by increasing the recursion and backtrack limit. You can paste the following code into your wp-config.php 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 has fixed the issue for you.

You may also want to see our WordPress troubleshooting guide, which teaches the steps you should take to catch and fix WordPress problems by yourself, or our expert pick of the best WordPress managed hosting providers.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Fix the WordPress White Screen of Death (Step by Step) first appeared on WPBeginner.

How to Paginate Comments in WordPress (Step by Step)

Have you noticed that your blog posts with a lot of comments load slower than other posts? That’s because loading so many comments increase server load which increases your average page load time.

Having a lot of comments is a good thing because it means that your users are engaged with your content. Your most commented posts are usually the most popular posts on your blog.

However if a lot of comments are slowing down your website, then it can hurt your SEO rankings. That’s when pagination for WordPress comments comes handy.

In this article, we will show you how to paginate comments in WordPress to speed up your post load time. The best part is that it comes as a default feature in WordPress, and it is very easy.

Paginate comments in WordPress

Why You Should Paginate Comments in WordPress

Comment pagination helps you improve your website speed which is an important factor in your website SEO rankings.

Many of our users have reported that sometimes posts with a lot of comments can cause their readers to see white screen of death because it exhausts their server’s memory.

Even when it doesn’t cause ‘white screen of death’, posts with a lot of comments tend to be really really slow.

Comment pagination reduces server load for your most commented posts by splitting comments into multiple pages.

Another reason to paginate your WordPress comments is to maintain the keyword density of your articles. Comments add a lot of content to your post’s page, and they may not always include your target keywords in a sufficient amount.

When keyword ratio to content decreases, search engines fail to index your post for the right keywords.

Comment pagination can also have a negative SEO impact if it is not used correctly. Basically, WordPress generates URLs for each new page of comments. Search engines may consider this as ‘duplicate content’.

This issue can be easily fixed by using the Yoast SEO plugin, which points search engines to the canonical URL of your article.

Now that we have discussed the pros and cons of comment pagination, let’s take a look at how to easily paginate comments in WordPress.

Paginating WordPress Comments in Two Steps

The first thing you need to do is login to your WordPress admin area and go to Settings » Discussions page.

Next, look for the ‘Break comments into pages’ option. From here you need to enter the number of comments you want on each page, and how you want to display them.

Break Comments into Pages in WordPress Posts

Don’t forget to click on the ‘Save Changes’ button to store your settings.

You can now visit any popular post on your website that has a lot of comments. You will notice the pagination links below the comments.

Depending on your theme’s styling, you will either see numeric pagination or ‘Previous / Next’ comment links.

Here is how comment pagination looks on our article 24 “Must Have” WordPress Plugins.

WordPress Comments Pagination in WPBeginner

Note: Just like comments, you can also paginate WordPress posts by splitting a long post into multiple pages.

We hope that this tutorial helped you paginate comments in WordPress. You might also want to see our guide on how to combat comment spam in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Paginate Comments in WordPress (Step by Step) appeared first on WPBeginner.