75 guides published Start a blog Fix my site How we test
FIX IT

A Plugin Update Caused a Fatal Error

A plugin update that introduces a fatal error takes the site down immediately. Modern WordPress often catches this and emails a recovery link, but not always, and not when the error is in a hook that runs before that protection engages.

The short version

  • Check your admin email first — WordPress may have sent a recovery link.
  • Otherwise disable the plugin by renaming its folder over SFTP.
  • The debug log names the plugin and the line.
  • Roll back to the previous version rather than leaving it off.

1. Check for the recovery email

WordPress has a fatal-error protection feature that puts the site in recovery mode, deactivates the offending plugin, and emails a special login link to the admin address. Check that inbox, including spam, before doing anything else.

If the email never arrives, the admin email address is wrong or mail is not sending — both worth fixing afterwards.

2. Find out which plugin

Enable logging in wp-config.php:

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

Reload the site, then read wp-content/debug.log. A fatal error names the file:

PHP Fatal error: Uncaught Error: Call to undefined function some_function()
in /wp-content/plugins/the-plugin/includes/class-main.php:88

3. Disable it from the filesystem

# just the one plugin
mv wp-content/plugins/the-plugin wp-content/plugins/the-plugin-off

# or all of them, if you do not know which
mv wp-content/plugins wp-content/plugins-off

WordPress deactivates any plugin whose files it cannot find. The site should return immediately.

4. Roll back to the previous version

Leaving a plugin deactivated is a workaround, not a fix — especially if the site depends on it. Install the version that was working:

wp plugin install the-plugin --version=2.4.1 --force

Every plugin in the official repository keeps its previous releases under the Advanced view on its page. Download the version you were on, remove the broken one, and upload the old one over SFTP if you do not have WP-CLI.

5. Then work out what changed

  • Read the plugin’s changelog for the version that broke. A major version bump usually says what changed.
  • Check whether it now requires a newer PHP version than your server runs.
  • Check whether it conflicts with another plugin — “call to undefined function” often means a dependency it expected is missing.
  • Look at the support forum. If the release broke a lot of sites, somebody has already reported it.

Watch out

Do not simply update again hoping it resolves itself. If the plugin requires PHP 8.2 and your server runs 8.0, every update will fail the same way until you address the version.

Preventing the next one

  1. Update on staging first. A fatal error there costs nothing.
  2. Update in small batches, not all at once, so you know what broke.
  3. Confirm the admin email address is correct and that mail actually sends, so recovery mode can reach you.
  4. Take a backup immediately before any batch.
  5. Never update immediately before you are unavailable.

If the site is still broken with all plugins off

Then the cause is the theme or core. Rename the active theme’s folder to force a fallback, and if that does not help, replace core:

wp core download --force

Common questions

Will I lose the plugin’s settings?

No. Settings live in the database and survive deactivation, folder renaming, and version rollback.

Is rolling back safe?

Generally yes, for one minor version. Rolling back across a major version can be a problem if the newer version migrated the database schema.

How do I know which version I was on?

The plugin’s changelog with dates, or your backup, or the update email if your host sends one.

S

Sumit

Writes everything on TechMozz.

More in Fix It