How to Fix "There Has Been a Critical Error on This Website" in WordPress

By Akash VishwakarmaUpdated October 2, 20269 min read
Quick answer: This message means PHP hit a fatal error, and the cause is almost always a plugin, a theme, or a PHP version mismatch. Open the recovery mode link WordPress emailed to your admin address and deactivate the item it names. If there is no email, rename the plugins folder through your hosting File Manager, then switch on the debug log to find the exact file causing the crash.
Illustration of a website page with a warning sign and a wrench, representing the WordPress critical error
A critical error looks scary, but it is usually a single misbehaving plugin or theme.

You update a plugin, refresh your site, and instead of your homepage you see one plain sentence: "There has been a critical error on this website." Visitors see it too, so every minute counts. The good news is that this error is a code-level problem. Your posts, pages and settings sit safely in the database, and in most cases you can bring the site back in under fifteen minutes.

In this guide I will walk through six fixes in the order I would try them on a client site, starting with the quickest and least risky. You do not need to be a developer. You only need access to your hosting account.

What this error actually means

Since WordPress 5.2, the software catches fatal PHP errors instead of leaving you with a blank white screen. The full message reads: "There has been a critical error on this website. Please check your site admin email inbox for instructions." In other words, WordPress tried to run some code, the code crashed, and WordPress stopped the page from loading so it would not show broken output.

The message itself does not say which plugin or theme failed. That is why the fixes below focus on finding the culprit quickly.

Common causes

  • A plugin update or a new plugin that conflicts with another plugin or with your theme.
  • A theme update or edits made to functions.php that contain a typo or a missing bracket.
  • A PHP version mismatch, for example an older plugin running on a newer PHP version, or a new plugin that needs a newer PHP than your host provides.
  • Low PHP memory on shared hosting, especially with page builders and many plugins.
  • Corrupted core files after an interrupted update.

Fix 1: Use the recovery mode email

Check the inbox of the admin email address saved in your WordPress settings. WordPress usually sends a message titled "Your Site is Experiencing a Technical Issue". It names the plugin or theme that caused the crash and includes a special recovery link.

  1. Open the email and click the recovery mode link.
  2. Log in to your dashboard. A banner tells you that recovery mode is active.
  3. Go to Plugins (or Appearance → Themes) and deactivate the item named in the email.
  4. Click Exit Recovery Mode and reload your site.
Illustration of an email envelope with a key, representing the WordPress recovery mode email link
The recovery link lets you reach the dashboard even while the site is broken.
No email? Check your spam folder first. The email goes to the address under Settings → General, which may be an old address you no longer use. If you cannot find it, move on to Fix 2 or Fix 3.

Fix 2: Turn on the debug log to find the exact cause

The debug log records the real error message, including the file and line number that crashed. Open your hosting File Manager (or FTP), edit wp-config.php in your site's root folder, and add these lines just above the comment 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 once, then open wp-content/debug.log. Look for a line that starts with "PHP Fatal error". The path in that line tells you the culprit. For example, a path containing /wp-content/plugins/some-plugin/ points to that plugin, and a path containing /wp-content/themes/ points to your theme.

Illustration of a magnifying glass over lines of code, representing reading the WordPress debug log
The debug log points to the exact plugin or theme file behind the crash.

When the site is fixed, set WP_DEBUG back to false or remove the three lines. Leaving debugging on in a live site is not recommended.

Fix 3: Deactivate all plugins from File Manager

If you cannot log in at all, you can disable plugins from the server side.

  1. Open File Manager in your hosting panel and go to wp-content.
  2. Rename the plugins folder to plugins-disabled.
  3. Reload your site. If it loads, a plugin was the cause.
  4. Rename the folder back to plugins. All plugins will now show as deactivated.
  5. Log in and activate plugins one at a time, reloading the site after each one, until the error returns. The last plugin you activated is the problem.
Illustration of a folder being renamed with a toggle switch, representing disabling WordPress plugins
Renaming the plugins folder switches every plugin off at once.

Once you know the culprit, update it, replace it with an alternative, or contact its developer with the error line from your debug log.

Fix 4: Switch to a default theme

If disabling plugins did not help, your active theme may be the problem. In wp-content/themes, rename the folder of your active theme. WordPress will fall back to a default theme such as Twenty Twenty-Five, as long as one is installed. If the site loads, the issue is in your theme or in code you added to its functions.php file. Undo your latest edit, or restore the theme from a clean copy.

Fix 5: Check PHP memory and PHP version

On shared hosting, a low memory limit can trigger fatal errors, particularly with page builders. In wp-config.php, add this line above the "stop editing" comment:

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

Next, check your PHP version in your hosting panel (in cPanel this is usually under "Select PHP Version" or "MultiPHP Manager"). Read the requirements on the plugin or theme page. Older plugins sometimes break on the newest PHP version, and newer ones may refuse to run on an outdated version. Switch to a version supported by everything you use, then reload the site.

Fix 6: Replace core files or restore a backup

If nothing above works, the WordPress core files might be damaged, often after an update that was interrupted. Download a fresh copy of WordPress from wordpress.org, unzip it, and upload the wp-admin and wp-includes folders to your site, overwriting the existing ones. Do not overwrite wp-content or wp-config.php, because those hold your themes, plugins, uploads and database details.

If you have a recent backup, restoring it is the cleanest last resort. If you do not have one, read the section below and set one up as soon as your site is back.

How to prevent the critical error in future

  • Back up before updating. A backup turns a bad update into a five-minute rollback.
  • Update one thing at a time. If something breaks, you know exactly what caused it.
  • Test on a staging copy when you manage a business or client website.
  • Remove plugins you do not use. Fewer plugins means fewer possible conflicts.
  • Keep the admin email current so recovery emails actually reach you.

Frequently asked questions

Will I lose my content because of this error?

Usually not. The error comes from code that failed to run, while your posts, pages and settings stay in the database. Still, take a backup before you start changing files.

Is this the same as the WordPress white screen of death?

They have the same cause, a fatal PHP error. Older WordPress versions showed a blank white page. Newer versions show the critical error message and can send you a recovery email.

Can this error hurt my SEO?

A short outage is rarely a problem. If the site stays broken for days, Google may struggle to crawl it, so fix it quickly.

What if I cannot access my hosting panel either?

Contact your hosting provider's support and ask them to share the PHP error log for your site. That log contains the same information as the WordPress debug log.

About the author: I am Akash Vishwakarma, a WordPress developer and digital marketer. I run GrowWP.in and Webzuro, where I build and maintain WordPress websites for clients. If this guide fixed your site, share it with someone who is stuck on the same error.