Skip to content

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

A step-by-step guide to finding and fixing the WordPress critical error: recovery mode, the debug log, plugin and theme conflicts, PHP versions, and memory limits.

Developer reviewing WordPress code on two monitors

You open your website and instead of your homepage you see one line: “There has been a critical error on this website.” Sometimes it adds “Please check your site admin email inbox for instructions.” Your visitors see the same message, so every minute counts.

The good news: this error almost never means your content is gone. It means PHP hit a fatal error and WordPress stopped loading the page to protect the site. In most cases the cause is a plugin, a theme, or a PHP version change, and it can be fixed without losing anything.

This guide walks through the same steps our WordPress specialists use, from the quickest checks to the deeper ones.

Before you start: if you can, download a backup from your hosting control panel. Several steps below involve renaming folders, and a backup means you can always undo.

What the critical error message actually means

Since WordPress 5.2, when PHP throws a fatal error (for example a plugin calls a function that does not exist), WordPress catches it and shows the critical error screen instead of a blank white page. At the same time it tries to email the site administrator with details and a special recovery mode link.

The most common causes we see:

  • A plugin or theme update that is not compatible with your WordPress or PHP version
  • Your host upgraded PHP (for example from 7.4 to 8.1 or 8.2) and older code breaks
  • Two plugins conflicting with each other
  • PHP running out of memory
  • A corrupted or incomplete update (the update stopped halfway)

Look in the inbox (and spam folder) of the email address set as the WordPress administrator email. The message is usually titled “Your Site is Experiencing a Technical Issue”. It often names the plugin or theme that caused the error.

Click the recovery mode link. It logs you into wp-admin with the faulty plugin or theme paused, so you can deactivate it, update it, or replace it. If the email names a plugin, start there.

No email? That is common, because many hosts do not deliver WordPress emails reliably. Move on to step 2.

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

WordPress can write the real error to a log file. Open wp-config.php in your host’s File Manager (or via FTP) and find the line that says define( 'WP_DEBUG', false );. Replace it with:

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 starting with PHP Fatal error. It contains a file path, for example:

PHP Fatal error: Uncaught Error: Call to undefined function ... in /wp-content/plugins/example-plugin/includes/class-main.php:142

The folder after /plugins/ or /themes/ tells you exactly what is broken. In this example it is example-plugin.

Important: when the site is fixed, set WP_DEBUG back to false and delete debug.log. Leaving the log in place can expose information about your site.

Step 3: Deactivate the faulty plugin without wp-admin

If you cannot reach the dashboard, you can disable a plugin by renaming its folder:

  1. In File Manager or FTP, go to wp-content/plugins/.
  2. Rename the plugin’s folder, for example example-plugin to example-plugin-off.
  3. Reload your site. WordPress cannot find the plugin, so it skips it.

If the log did not point to a specific plugin, rename the whole plugins folder to plugins-off. If the site comes back, rename it back to plugins and then disable plugins one at a time until the error returns. The last one you re-enabled is the culprit.

Step 4: Rule out the theme

If the error path points to wp-content/themes/, rename your active theme’s folder. WordPress will fall back to a default theme such as Twenty Twenty-Four, as long as one is installed. If none is installed, upload one from WordPress.org first.

If you use a child theme, check the parent theme too. Custom code added to a theme’s functions.php is a frequent cause, especially after a PHP upgrade.

Step 5: Check your PHP version

If the error started without you updating anything, your host may have changed the PHP version. Most hosting panels (cPanel, Plesk, CyberPanel, and others) let you choose the PHP version per site.

Temporarily switching to the previous version can bring the site back immediately. Treat this as a short-term fix: older PHP versions stop receiving security updates, so the incompatible plugin or theme still needs to be updated or replaced.

Step 6: Fix “Allowed memory size exhausted” errors

If your debug log says “Allowed memory size of … bytes exhausted”, PHP ran out of memory. Add this line to wp-config.php, above the line that says “That’s all, stop editing”:

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

Some hosts cap memory below this, so if the error continues, ask your host to raise the PHP memory_limit. If memory keeps running out, a plugin may have a bug or a loop, which is worth investigating rather than just raising the limit again.

Step 7: Repair a broken WordPress update

If the error appeared right after a WordPress core update, the update may have stopped halfway. Look for a file named .maintenance in the site root and delete it. Then download a fresh copy of the same WordPress version from WordPress.org and re-upload the wp-admin and wp-includes folders. Do not overwrite wp-content or wp-config.php, because that is where your content and settings live.

After the site is back

  • Set WP_DEBUG back to false and delete wp-content/debug.log.
  • Update or replace the plugin or theme that caused the error. Check its changelog and support forum for known issues.
  • Test your key pages: homepage, contact form, checkout if you run a store.
  • Set up automatic backups so the next problem is a quick restore instead of an emergency.
  • If the site still shows a blank page instead of the error, see our guide to the WordPress white screen of death.

When to call a professional

Get help if the debug log points to code you do not recognize, if the error comes back after you fix it, if you run an online store and are losing orders, or if you simply do not have access to your hosting files. Guessing on a live site can turn one error into several.

Want us to fix it for you? Our WordPress Fix service finds the root cause, fixes it, and tells you exactly what changed. Fixed price of $49, confirmed before any work starts, and backed by our Service Guarantee: if we cannot fix the agreed problem, you do not pay. Request a fix.

Frequently asked questions

Will I lose my content because of the critical error?

Almost never. Your posts, pages, and orders are stored in the database, and the critical error only stops PHP from building the page. Once the faulty code is disabled, your content appears again.

Why did this happen when I did not change anything?

Automatic plugin updates, a PHP upgrade by your host, or an expired license on a premium plugin can all trigger the error without any action on your side.

Is the critical error a sign my site was hacked?

Usually not. But if the debug log points to unfamiliar files, or you see files you did not create in wp-content, treat it as a possible infection and follow our guide on what to do if your WordPress site is hacked.

Still Stuck? We Can Fix It for You

Tell us what is going on. We confirm the scope and price before any work begins.