New 24/7 monitoring and daily cloud backups now included in every Shield Pro plan.

Error fix

How to fix a WordPress critical error

A WordPress critical error means PHP crashed while loading your site. The message is vague on purpose. This tutorial walks through the fastest safe checks when you still have hosting access but wp-admin may be dead.

Time: 20-40 minutes Level: Intermediate

What a critical error actually means

Since WordPress 5.2, a white or grey screen with “There has been a critical error on your website” usually hides a PHP fatal error. Something in core, a plugin, or your theme called a function that no longer exists, hit a memory limit, or violated PHP 8 syntax rules.

The fix is almost never “reinstall WordPress”. You need the real error message, then you disable or update the file that triggers it. If you cannot open wp-admin, you do that through hosting file access, not the dashboard.

Take a backup or snapshot in your hosting panel before renaming plugin folders or editing wp-config.php. Recovery is easier when you can roll back one step.

Step 1: Enable debug logging in wp-config.php

Open wp-config.php in your site root via hosting File Manager, SFTP, or SSH. Find the line that says “That’s all, stop editing!” and paste these constants above it. On a live site, log to file only and do not print errors to visitors.

php
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

Reload the broken page once, then open wp-content/debug.log. The last lines usually name the plugin file and line number that fatals. If the log stays empty, your host may disable logging or the crash happens before WordPress boots. Check the hosting error log in cPanel, Plesk, or your provider’s dashboard as well.

Step 2: Use WordPress recovery mode

When a plugin or theme fatals, WordPress may email the site admin a recovery mode link. That link lets you access wp-admin with the offending extension paused. Follow it, log in, and deactivate the plugin from the Plugins screen.

  • Check the inbox for your site admin email, including spam folders.
  • If no email arrived, skip to FTP isolation below.
  • After recovery, update or remove the plugin before reactivating it.

Step 3: Deactivate all plugins via FTP or file manager

Rename the plugins directory so WordPress cannot load any plugin PHP. This is the fastest way to prove a plugin conflict when admin is down.

  1. Connect with SFTP or open File Manager in hosting.
  2. Go to wp-content/
  3. Rename plugins to plugins.disabled
  4. Load the site and wp-admin again.

If the site works, rename the folder back to plugins and deactivate plugins one by one from admin, or rename individual plugin folders inside wp-content/plugins/ until the fatal returns. The last plugin you enabled is the culprit.

Step 4: Rule out the active theme

If disabling plugins does not help, switch themes at the file level. WordPress falls back to a default theme when the active theme folder is missing.

  1. Open wp-content/themes/
  2. Rename your active theme folder, for example mytheme to mytheme.off
  3. Ensure twentytwentyfour or another default theme folder still exists.
  4. Reload the site.

Step 5: Check PHP version and memory

Hosts migrate PHP versions without warning. Legacy plugins break on PHP 8.x. In hosting, temporarily switch PHP 8.2 to 8.1 or 7.4 only as a short test, not a long-term fix.

If logs mention memory exhausted, raise WP_MEMORY_LIMIT in wp-config.php:

php
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

When to stop DIY and hire help

Call a developer if the error persists after plugin and theme isolation, if the log points at WordPress core files you did not change, or if you are on a live shop and cannot afford trial-and-error. BugShield quotes critical error fixes at a confirmed price with a BugShield developer and secure Vault access.

FAQs

Will enabling WP_DEBUG break my site?

With WP_DEBUG_DISPLAY set to false and logging enabled, visitors still see the critical error screen but errors write to debug.log. Turn debug off after you fix the issue.

Can I fix a critical error without FTP?

Only if recovery mode email works or your host offers a file manager. Without file access you need your host or a developer to intervene.

Should I delete wp-content/plugins?

No. Rename it so you can restore instantly. Deleting loses custom plugin code and makes rollback harder.

How do I fix a WordPress critical error after an update?

Updates often mean a plugin is incompatible with new core or PHP. Isolate plugins first, then update or replace the extension named in debug.log.

Rather someone else fixed it?

Request a fix at a confirmed price. Named UK developer, secure Vault, direct chat.

Request a Fix