WordPress White Screen of Death: How to Fix a Blank Page or “Critical Error”

WordPress White Screen of Death: How to Fix a Blank Page or “Critical Error”

You open your website and see nothing. No header, no error, just a white page. Or you see one line: “There has been a critical error on this website.” Both are versions of the problem WordPress users call the white screen of death, and both can be frightening because they often lock you out of wp-admin as well.

The good news is that your content is almost never lost. The white screen means PHP hit a fatal error and stopped before it could build the page. Your posts, pages and images are still in the database and on the server. The job is to find what caused the error and switch it off. This guide shows how, in the order that solves the most cases first.

Before you start: take a backup

If your host offers backups, take a fresh one or note the time of the last one before you change anything. Most fixes below are safe, but renaming folders and editing wp-config.php is easier to undo when you have a backup to fall back on.

Common causes at a glance

When it happened Most likely cause Go to
Right after installing or updating a plugin That plugin Fix 2
Right after changing or updating the theme The theme or code added to functions.php Fix 3
After your host changed the PHP version A plugin or theme that does not support the new PHP version Fix 5
Only on big pages, or when uploading or importing PHP memory limit Fix 4
After moving the site to a new host Missing files, wrong PHP version, .htaccess or permissions Fix 7
Only in the editor, the front end works A plugin or browser extension breaking the editor Fix 8
Nothing changed that you know of An automatic update, the cache or the server Fix 1, then 2

Fix 1: Check your email for Recovery Mode

Since WordPress 5.2, a fatal error usually shows the “critical error” message instead of a blank page, and WordPress sends an email to the site’s admin email address. The email names the plugin or theme that caused the error and includes a special Recovery Mode link.

Open that link and log in. WordPress pauses the faulty plugin or theme for your session only, so you can reach the dashboard and deactivate it, update it or replace it. Visitors still see the error until you fix the cause, so act quickly once you are in.

No email? Check the spam folder, and remember it goes to the address in Settings > General, which may be an old address. Many sites also have no working email setup, so the message never leaves the server. In that case, move on to fix 2.

Also clear any cache: your caching plugin, your host’s cache and your CDN if you use one. Sometimes the error is already fixed, for example by a plugin update, and the cache is still serving the blank page.

Fix 2: Deactivate plugins without wp-admin

Plugins are the most common cause. If you can still reach wp-admin, deactivate the most recently updated plugin first. If you cannot log in, use your hosting File Manager or an FTP program:

  1. Open the folder where WordPress is installed (often public_html) and go to wp-content.
  2. Rename the plugins folder to something like plugins-off. WordPress can no longer find any plugin, so all of them are deactivated.
  3. Reload your site. If it works, a plugin was the cause.
  4. Rename the folder back to plugins. The plugins stay deactivated, but they are listed again in wp-admin.
  5. Activate them one at a time in Plugins, reloading the site after each one. When the white screen returns, you have found the culprit.

If you already suspect one plugin, you can rename only that plugin’s folder inside wp-content/plugins instead. If you have SSH access and WP-CLI, wp plugin deactivate --all does the same job in one command.

Once you know which plugin breaks the site, check for an update, look at the plugin’s support forum for the same error, or replace it with an alternative. Do not keep reactivating it on the live site.

Fix 3: Switch to a default theme

If plugins were not the cause, test the theme. In wp-content/themes, rename your active theme’s folder, for example from mytheme to mytheme-off. WordPress then falls back to a default theme such as Twenty Twenty-Five, if one is installed. If no default theme is in the folder, upload one from wordpress.org first.

If the site comes back, the problem is in the theme. A very common cause is a code snippet pasted into functions.php with a missing semicolon or bracket. Open the file in the File Manager, remove or correct the last code you added, and rename the theme folder back.

Fix 4: Turn on debugging to see the real error

When the cause is not obvious, let WordPress write the error to a log file. Open wp-config.php in the main WordPress folder and find the line with WP_DEBUG. Replace it with these lines, above the line that says “That’s all, stop editing”:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Reload the broken page, then open wp-content/debug.log. Look for a line that starts with PHP Fatal error. It usually names the exact file and line, for example a path inside wp-content/plugins/some-plugin/, which tells you which plugin or theme to deal with. Your host’s error log in the hosting panel often shows the same information.

If the error mentions “Allowed memory size exhausted”, the site ran out of PHP memory. Add this line to wp-config.php:

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

WordPress cannot go above the limit your host allows, so if the error continues, ask your host to raise the PHP memory limit or change it in the hosting panel. Keep in mind that a site that suddenly needs much more memory often has a plugin doing something heavy, so it is worth finding out which one.

When you are done, set WP_DEBUG back to false and delete debug.log. A debug log left on a live site can reveal file paths and other details to anyone who finds it.

Fix 5: Check the PHP version

A “critical error after PHP update” is a common search for a reason. When a host moves a site to a newer PHP version, old plugins and themes that use removed PHP functions can crash. When the debug log shows errors such as “Call to undefined function” right after a PHP change, this is the likely cause.

The quick fix is to switch back to the previous PHP version in your hosting panel, which usually brings the site back within minutes. The lasting fix is to update or replace the plugin or theme that cannot handle the newer version, then move PHP forward again. Old PHP versions stop getting security updates, so staying on one is only a short term solution.

Fix 6: Repair WordPress core files

Rarely, an interrupted update or a server problem leaves WordPress core files damaged or missing. If you can reach wp-admin, go to Dashboard > Updates and click Re-install version. This replaces the core files and does not touch your content, plugins or themes.

If you cannot log in, download the same WordPress version from wordpress.org, and upload its wp-admin and wp-includes folders over the existing ones. Do not overwrite wp-content or wp-config.php, because they hold your themes, plugins, uploads and settings.

A related problem: if you see “Briefly unavailable for scheduled maintenance” instead of a white screen, an update was interrupted. Delete the file named .maintenance in the main WordPress folder and the site comes back.

Fix 7: White screen after moving to a new host

If the site worked on the old server and shows a white screen on the new one, check these in order:

  • PHP version. Set the same PHP version the old host used, then update later if needed.
  • Missing files. Compare the file count or size with the old server. A transfer that stopped halfway leaves some plugin or core files missing.
  • Database details. Check that the database name, user, password and host in wp-config.php match the new server. Wrong details usually show “Error establishing a database connection”, but can also cause other errors.
  • .htaccess. Rename .htaccess to .htaccess-old, then log in and save Settings > Permalinks to create a fresh one.
  • File permissions. The usual setting is 755 for folders and 644 for files. Your host’s support team can reset them if they are wrong.

Fix 8: Blank page only when editing

If the site works for visitors but the block editor or your page builder shows a white screen, the problem is usually JavaScript, not PHP. Try these:

  • Open the editor in a private browser window, which turns off most browser extensions. Ad blockers and some security extensions can break editors.
  • Open the browser console (F12, then the Console tab) and look for red errors. They often name the plugin whose script failed.
  • Clear your caching plugin’s cache and turn off JavaScript minification or “delay JavaScript” for logged in users if your caching plugin applies it in the editor.
  • Test with plugins deactivated, as in fix 2, to find a conflict with the editor.

How to avoid it next time

  • Update with a backup. Take a backup before updating plugins, themes or PHP, and update a few things at a time instead of everything at once.
  • Test big changes on staging. Many hosts offer a one click staging copy. Test major updates there first.
  • Do not edit functions.php from wp-admin. Use a code snippets plugin or a child theme, and keep a copy of the original file.
  • Keep the admin email working. Set a current address in Settings > General and make sure your site can send email, so the Recovery Mode message reaches you.
  • Remove plugins you do not use. Fewer plugins means fewer things that can break during an update.

Quick answers

What causes the WordPress white screen of death?

A PHP fatal error that stops WordPress from building the page. The usual triggers are a faulty plugin or theme, a PHP version the code does not support, too little PHP memory, or damaged core files.

How do I fix a critical error when I cannot access wp-admin?

Use the Recovery Mode link from the admin email if you received it. If not, rename the wp-content/plugins folder with your host’s File Manager or FTP to deactivate all plugins, then reactivate them one by one to find the cause.

Will I lose my content?

Almost never. Your posts and pages are stored in the database, and the white screen only means the page could not be built. None of the fixes in this guide delete content, but take a backup before you start anyway.

Why is my WordPress page blank with no errors?

Error display is turned off on most live servers, so a fatal error shows as a blank page. Turn on the debug log (fix 4) or check your host’s error log to see the real message.

Still stuck, or do not want to touch files on a live site? Contact Anjon IT and we can help you get the site back. If your site works but feels slow, read our guide on why a WordPress site is slow and how to fix it.