Saurabh Web Solutions Subscribe
WordPress Fixes

"There Has Been a Critical Error on This Website": How to Fix WordPress White Screen

2 free files — jump to downloads
"There Has Been a Critical Error on This Website": How to Fix WordPress White Screen - cover image
On this page
  1. Step 1: Think about what changed
  2. Step 2: Check your email for the recovery mode link
  3. Step 3: Deactivate the suspect plugin through File Manager
  4. If the theme is the problem
  5. Step 4: Read the debug log to find the exact cause
  6. Step 5: Fix the common underlying causes
  7. "Allowed memory size exhausted"
  8. PHP version incompatibility
  9. A broken code snippet
  10. A failed update
  11. Step 6: Clean up
  12. Prevent the next critical error
  13. Download the files

You open your website and see a blank white page, or the message "There has been a critical error on this website." Sometimes the admin area is broken too. It looks catastrophic, but the cause is almost always small: one plugin or theme throwing a fatal PHP error. Your content is safe in the database the whole time.

Here is the calm, step-by-step way to find and fix a critical error on this website, from the quickest fix to the detective work.

Step 1: Think about what changed

Most critical errors appear right after something changed. Ask:

  • Did you just install, update or activate a plugin or theme?
  • Did WordPress or WooCommerce update automatically?
  • Did you or your host change the PHP version?
  • Did you edit functions.php or add a code snippet?

If you know the answer, you already know where to look in Step 3.

When WordPress hits a fatal error, it emails the site's admin address with the subject "Your Site is Experiencing a Technical Issue". The email names the plugin or theme that crashed and includes a recovery mode link.

  1. Open the link and log in. The broken plugin or theme is paused in recovery mode.
  2. Go to Plugins, deactivate the named plugin (or switch themes), and exit recovery mode.

No email? That is common, because many WordPress sites cannot send email at all. Our guide on WordPress not sending emails fixes that for next time. For now, continue with Step 3.

Step 3: Deactivate the suspect plugin through File Manager

You do not need the dashboard to disable a plugin. Renaming its folder does the same thing.

  1. Log in to your hosting panel and open File Manager (or connect with FTP).
  2. Go to public_html/wp-content/plugins (or your WordPress folder).
  3. Rename the suspect plugin's folder, for example elementor-pro to elementor-pro-off.
  4. Reload your site. If it works, that plugin was the cause.

Not sure which plugin? Rename the whole plugins folder to plugins-off. If the site comes back, rename it back to plugins, then rename plugins one at a time until the error returns.

If the theme is the problem

Rename your active theme's folder in wp-content/themes. WordPress falls back to a default theme (keep one installed, such as Twenty Twenty-Five), and you can then fix or reinstall your theme.

Step 4: Read the debug log to find the exact cause

When guessing does not work, let WordPress tell you. Turn on logging in wp-config.php (download a backup copy first):

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

Reload the broken page once, then open wp-content/debug.log. Look at the last line starting with PHP Fatal error. It ends with a file path like /wp-content/plugins/some-plugin/includes/file.php on line 42; the folder after plugins/ is your culprit.

The free SWS Site Fixer plugin (download below) can turn the debug log on and off from its Site Health tab and shows the latest errors without opening files, once your site is reachable again.

Step 5: Fix the common underlying causes

"Allowed memory size exhausted"

The site ran out of PHP memory. Raise the limit using our guide to the memory exhausted error.

PHP version incompatibility

Errors mentioning functions that do not exist, or "syntax error" right after a host changed PHP versions, usually mean a plugin or theme is too old for the new PHP version, or too new for an old one. Update the plugin, or temporarily switch PHP back in your hosting panel while you update.

A broken code snippet

If you edited functions.php, remove your change through File Manager. In future, add snippets with a snippet plugin or a child theme so one typo cannot take down the site.

A failed update

If an update stopped halfway, WordPress may be stuck. Delete the .maintenance file in your WordPress folder if the site says "Briefly unavailable for scheduled maintenance", then reinstall the plugin that was updating.

Step 6: Clean up

  1. Update or replace the plugin or theme that caused the error. Check its changelog and support forum; others often report the same problem.
  2. Set WP_DEBUG back to false and delete debug.log.
  3. Clear any caching plugin or server cache.
  4. Test your key pages, forms and checkout.

Prevent the next critical error

  • Take a backup before every update, and keep automatic backups running.
  • Test major updates on a staging site first (many hosts offer one-click staging).
  • Avoid nulled or abandoned plugins; they are a common source of fatal errors and malware.
  • Keep PHP on a supported version and plugins up to date together.
  • Follow the WordPress security checklist monthly routine.

Download the plugin and the debug snippet below. Keep the snippet somewhere handy; next time a white screen appears, you will have the site back in minutes.

Download the files

Free to use in your own and client projects · no sign-up · tested before upload. Always try files on a staging site first and keep a backup.

Download not working? Tell me and I'll fix it.

Frequently asked questions

What causes 'There has been a critical error on this website'?

A PHP fatal error, most often from a plugin or theme that is incompatible with your PHP or WordPress version, a failed update, or running out of memory. WordPress shows this message instead of the technical error to protect visitors.

Will I lose my content if my site shows a critical error?

Almost never. Your posts, pages and settings are in the database and are untouched. The error comes from code files, so disabling the broken plugin or theme brings the site back with all content intact.

What is WordPress recovery mode?

When a fatal error happens, WordPress emails the admin address a special link. Opening it logs you into a safe mode where the broken plugin or theme is paused, so you can deactivate or update it from the dashboard.

I did not get the recovery mode email. What now?

Emails often fail on WordPress sites. Use File Manager or FTP to rename the plugin's folder in wp-content/plugins, which deactivates it without needing the dashboard. Then fix your email setup so future alerts arrive.

Should I leave WP_DEBUG on?

No. Turn it off once the problem is solved and delete the debug.log file, because the log can reveal server paths and details about your setup.