PHP error guide

WordPress critical error: meaning and fix

Error summary

Read the underlying PHP fatal from the protected log or recovery email, then update, replace, or narrowly disable the responsible plugin or theme.

What it means

Read the underlying PHP fatal from the protected log or recovery email, then update, replace, or narrowly disable the responsible plugin or theme.

What the error means

WordPress caught a fatal PHP error through its fatal error handler and showed a generic public message instead of exposing details.

Why PHP produces it

Core, a plugin, a theme, or custom code triggered a fatal error during bootstrap or request handling.

PHP version notes

The behavior described for WordPress critical error applies to PHP 7.4–8.4 unless a narrower version is stated; exact wording can vary by SAPI and patch release.

Most common causes

  • A plugin calls removed or incompatible PHP behavior.
  • A theme update has a syntax or type error.
  • Deployment leaves incomplete plugin files or dependencies.

Minimal examples

BAD — reproduces the problem

php
define("WP_DEBUG_DISPLAY", true); // on public production

FIXED — safer pattern

php
define("WP_DEBUG_LOG", true); define("WP_DEBUG_DISPLAY", false);

Step-by-step diagnosis

  1. Check the recovery-mode email and protected PHP/WordPress logs.
  2. Identify the first plugin, theme, or custom-code frame.
  3. Reproduce on staging with the same PHP and extension versions.

Fixes

Repair the responsible component

Use recovery mode or a controlled rename only to regain admin access, then install a compatible fixed release.

php
define("WP_DEBUG", true);
define("WP_DEBUG_LOG", true);
define("WP_DEBUG_DISPLAY", false);

Common mistakes when fixing it

  • Deleting all plugins without identifying the failure.
  • Displaying fatal traces publicly.
  • Downgrading PHP globally and affecting other sites.

How to prevent it

  • Test plugin and theme updates on the target PHP version.
  • Maintain protected logs and backups.
  • Apply updates atomically.

Web server / environment notes

wordpress, fpm, apache. The public message intentionally hides the underlying PHP fatal.

Tags: wordpress,fpm,apache

Categories