Fix the white screen error (blank page)

Definitions

The white screen error (blank page), or ‘white screen of death’, happens when a WordPress website fails to load and displays a blank white screen instead. Here is a visual example of the white screen error:

Before you start

✅ Typically, the white screen error is due to a bad plugin or theme update on your WordPress website.

🚨 The quickest fix for the white screen error is to perform a data restore of your website.

ℹ️ Follow each step by step fix below in order, moving to the next only if the previous one doesn’t work.

Step by step

In most cases, the white screen error is caused by a plugin or theme.

Check for a plugin error

1. Open this guide: Check your website error log and apply common fixes

2. In that guide, follow all the steps under ‘Check your website error log

3. Once in your error log, use that same guide to ‘Identify a plugin error

4. If you find a plugin error, complete the ‘Fix a plugin error‘ steps

Check for a theme error

1. Open this guide: Check your website error log and apply common fixes

2. In that guide, follow all the steps under ‘Check your website error log

3. Once in your error log, use that same guide to ‘Identify a theme error

4. If you find a theme error, complete the ‘Fix a theme error‘ steps

Delete a Wordfence code snippet from your .htaccess file

The white screen error is often caused by the Wordfence plugin adding a code snippet to your .htaccess file. To fix this, remove the Wordfence code snippet from the .htaccess file.

1. Log in to your hosting control panel

2. Click on the File Manager button

3. Double click the domains folder

4. Find your website folder and double click on it

5. Look for the public_html folder and double click on it

6. In the public_html folder of your website, locate the .htaccess file. You might need to scroll depending on your device’s screen size and the file count.

7. Right-click on the .htaccess file once you find it and choose Edit from the dropdown menu.

8. The .htaccess file for your website will open in a new window. Scroll until you find the Wordfence code, which begins with # Wordfence WAF and ends with # END Wordfence WAF. Here is the full code snippet:

# Wordfence WAF
<IfModule LiteSpeed>
php_value auto_prepend_file '/home/cloudhelpcenter/public_html/cloudhelpcenter.com/wordfence-waf.php'
</IfModule>
<IfModule lsapi_module>
php_value auto_prepend_file '/home/cloudhelpcenter/public_html/cloudhelpcenter.com/wordfence-waf.php'
</IfModule>
<Files ".user.ini">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
</Files>
# END Wordfence WAF

9. Highlight and delete all of the Wordfence code in your .htaccess file and then click the Save File button followed by the X button to close the session.

  • Here is an example of the process:

10. Wait a few moments and then load your website

Increase your PHP memory threshold

Sometimes a white screen error is caused by a PHP memory threshold limit.

1. Log in to your hosting control panel

2. Click on the Select PHP version button

3. Look for the memory_limit dropdown

4. On the dropdown, select the highest threshold value available

5. Wait a few moments and then load your website

Restore your website from backups

Restoring from backups is the quickest way to get your website operational again.

Always start by restoring your website files, and if the issue persists, proceed to restore your database.