Mon–Fri 9:00–18:00 EET · We speak English and Lithuanian

"There has been a critical error on this website": what to do

How to find the cause of a WordPress critical error and restore your site without making things worse.

WPBuddy teamPublished: Updated: 7 min read

What a critical error means

Since version 5.2, when WordPress hits a fatal PHP error, it shows "There has been a critical error on this website" instead of a blank page. It also emails the admin with the error location and a recovery-mode link.

Common causes: a plugin or theme incompatible with a new PHP or WordPress version, a low memory limit, an incomplete update, or a code mistake after a manual edit.

First steps

  1. Check the admin email. WordPress names the plugin or theme that caused the error and includes a recovery-mode link.
  2. Do not rush to delete files. Back up files and database first, or confirm your host has a recent backup.
  3. Recall the last change. An update, a new plugin or a PHP version change is usually the answer.

Enable the error log

If there is no email, enable debug mode in wp-config.php. Errors are written to a file instead of being shown to visitors:

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

Reload the page and open wp-content/debug.log. The last "PHP Fatal error" line shows the file and line. Disable debug mode once fixed.

Disable the conflicting plugin

If the error points to a plugin, rename its folder via FTP or your host’s file manager, e.g. wp-content/plugins/name to name-off. WordPress will deactivate it. With WP-CLI:

wp plugin deactivate name

If the theme is the culprit, temporarily switch to a default theme such as Twenty Twenty-Five.

When to restore a backup

If the cause is not found quickly and the site earns revenue, the safest path is to restore the last working backup and investigate on staging. On WooCommerce, check that a restore will not remove recent orders.

How to prevent it

  • Update one item at a time, always with a fresh backup.
  • Test major updates on staging first.
  • Check plugin compatibility before changing PHP versions.
  • Use independent monitoring so you hear about outages immediately.

Frequently asked questions

Does a critical error mean my site is hacked?

Usually not. It is a PHP error, but if you also see unknown files or redirects, check security.

Will I lose content?

Content lives in the database, so disabling a plugin does not affect it.

Get urgent help

We reply on business days, in English or Lithuanian. For urgent issues, call or message us on WhatsApp.

Get help
Call WhatsApp Write