# WordPress: There Has Been a Critical Error on This Website

**Code:** `Critical error` · **Category:** WordPress · **Seen on:** WordPress, PHP, Linux

A PHP fatal error (usually from a plugin or theme) stopped WordPress; the real error is in the debug log or recovery-mode email.

## Meaning

Since WordPress 5.2, fatal errors show this friendly message instead of a white screen. WordPress emails the admin a recovery-mode link describing which plugin/theme failed.

## Common causes

- Plugin or theme incompatible with your PHP or WordPress version
- Plugin/theme update introduced a bug
- PHP memory limit exhausted
- Corrupted or partially uploaded plugin files
- Custom code in functions.php with a syntax error

## Quick fix

1. Open the recovery-mode link from the admin email
2. Enable WP_DEBUG_LOG and read wp-content/debug.log
3. Rename the offending plugin folder in wp-content/plugins via FTP/SSH
4. Switch to a default theme by renaming your theme folder
5. Raise memory: `define('WP_MEMORY_LIMIT', '256M');`

## Detailed fix by platform

### WordPress

1. wp-config.php — log errors without showing them to visitors:

```php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);      // writes wp-content/debug.log
define('WP_DEBUG_DISPLAY', false);
```


### Linux

1. With WP-CLI: `wp plugin deactivate --all` then re-enable one by one.

## How to diagnose

1. **Email** — Did WordPress email a recovery link naming the plugin?
2. **Debug log** — What is the fatal error and file?
3. **Recent change** — Which plugin/theme/PHP version changed?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/wordpress/critical-error)
