Blog

WordPress PHP fatal error after an update: read the message, then roll back

A WordPress PHP fatal error after an update is fixed faster when you know how to read the message: it almost always tells you if it's about the PHP version or a Composer conflict. This article shows you how to regain access to the site, restore the previous version of the plugin, and wait for the fix without staying broken.

WordPress PHP fatal error after an update: read the message, then roll back

Key points

  • The error message indicates the file involved and, most of the time, whether it concerns the PHP version or a Composer conflict.
  • If the admin area no longer responds, the WordPress recovery mode or renaming the plugin folder restores access.
  • The Maintenance module keeps two previous versions of each plugin and theme in the free version.
  • Downgrading the PHP version just shifts the problem: the Security module's PHP alert indicates the version to request from the host.
  • nexya Pro automatically rolls back an update that breaks the site; the plugin bug still needs to be fixed by its developer.

WordPress PHP fatal error: what the message is really saying

A WordPress PHP fatal error that appears right after an update almost always has the same cause: the new plugin code does not get along with the server or with other code already loaded. WordPress then displays “There has been a critical error on this website,” and the details can be found in the email sent to the administrator or in the server error log.

This detail is worth reading in full. It indicates the file at fault, hence the plugin folder, and the type of problem. On the WordPress.org forums, most topics opened in recent weeks fall into two families: an incompatibility with the PHP version, and a conflict between two copies of the same library installed with Composer.

In both cases, it is not your site that is deeply broken. It is a specific version of a plugin that is not running in your environment. The safest response, while the developer releases a fix, is to revert to the previous version.

First case: the plugin and the PHP version do not match

The message then talks about unexpected syntax, an unknown function, an incompatible return type, or directly mentions a version like PHP 8.3. Two situations arise.

Either the new version of the plugin requires a newer PHP version than your hosting provides. Or, conversely, your server has been upgraded to a recent PHP version and the plugin is still using a writing style that this version rejects.

In the first case, asking the host for a newer version is often the right path in the medium term. In the second, downgrading the PHP version is tempting, but not trivial, as we will see below.

Second case: two Composer copies stepping on each other’s toes

Many plugins embed their own libraries, loaded by a vendor/autoload.php file generated by Composer. If the site, or another plugin, is already loading the same library in a different version, PHP ends up with two definitions of the same class, or with the wrong one.

Several recent topics describe exactly this with Contact Form 7 6.2: a fatal error on the public site when the WordPress root contains its own Composer vendor folder. The message then cites a missing class, already declared, or a file located in a vendor folder.

This conflict cannot be resolved from the administration area. It requires a fix from the plugin developer, or a modification of your own Composer installation if you have one. In the meantime, reverting to the previous version restores the site.

A fatal error right after an update is fixed first by restoring the version that worked, and then by looking for the cause with a clear head.

The Maintenance module's holding page closes the site to visitors during the intervention.
The Maintenance module's holding page closes the site to visitors during the intervention.

Regaining access when the administration no longer responds

It all depends on where the error occurs. In the Composer case mentioned above, the error affected the public site: the administration remained accessible and the rollback could be done normally.

If the administration itself displays the critical error, WordPress sends an email to the administrator’s address with a link to recovery mode. This link opens the administration with the faulty plugin paused. If the email does not arrive, FTP access or the host’s file manager remains: renaming the plugin folder in wp-content/plugins disables it, and the administration comes back.

During the intervention, you can also close the site to visitors using the Maintenance module’s holding page, rather than leaving them with an error screen.

The Maintenance module is turned on from the hub, before the next update.
The Maintenance module is turned on from the hub, before the next update.

Rolling back after a fatal error, in four steps

  1. 1

    Read the full error message

    Open the email sent by WordPress or the server error log. Note the folder of the plugin involved and the type of error: PHP version, or class and file in a vendor folder.

    Read the full error message
  2. 2

    Regain access to the administration

    If the error only affects the public site, move on to the next step. Otherwise, use the recovery mode link or rename the plugin folder via FTP. Close the site to visitors with the holding page if the intervention takes time.

  3. 3

    Restore the previous version

    With the Maintenance module enabled before the update, restore one of the two kept versions of the plugin or theme, then check the public site and the administration.

  4. 4

    Report, then wait for the fix

    Open or follow the topic on the plugin forum with the error message. Only update again once the fixed version has been released. If you are modifying PHP, check the Security module's PHP alert first.

Restoring the previous version with the Maintenance module

The nexya Maintenance module keeps the previous version of each plugin before its update. Two versions are kept, and this also applies to themes. When an update breaks the site, you put one of these versions back in place, without searching for an archive on WordPress.org or using FTP.

The module is turned on from the nexya hub. One point matters here: it can only keep the versions of updates made after its activation. To be covered the day it happens, you must therefore activate it before, not after the breakdown.

This feature is part of the free version, on as many sites as you want.

Changing the PHP version: with caution

Downgrading the PHP version to run a single plugin can get the site back online, but shifts the problem. An older version may no longer receive security patches, and other extensions may depend on the recent version.

Before asking the host anything, check the Security module’s PHP alert. It indicates if the server’s PHP is missing the security patches released on October 21, 2026 (PHP2Shell), and the version to request: 8.2.35, 8.3.36, 8.4.27, or 8.5.12. If you change branches, request at least that one.

In most cases, it is better to keep PHP up to date, put the old version of the plugin back, and wait for its developer to make it compatible.

What nexya does, and what it does not do

We need to be clear about the limits. nexya does not fix extension bugs: a PHP incompatibility or a Composer conflict remains the responsibility of its developer. Nor does it diagnose PHP errors in general, and it does not roll back the WordPress core.

What it does is restore the working site while you wait for the fix to arrive. In the free version, you trigger this rollback yourself. nexya Pro, sold on nexya.dev, automatically rolls back an update that breaks the site without waiting for someone to notice.

  • Free: two previous versions kept for each plugin and theme, restored manually.
  • Free: the Maintenance module’s holding page and the Security module’s PHP alert.
  • nexya Pro: updates automatically rolled back when they break the site.
  • Out of scope: fixing the plugin code and rolling back the WordPress core.

FAQ

Why is my site showing a fatal error right after an update?

Most of the time, the new version of the plugin is incompatible with the server's PHP version, or it loads a Composer library already present in another version. The full error message, received by email or in the server log, indicates which of the two.

Can the Maintenance module roll back if I enable it after the crash?

No. It keeps the previous version at the time of the update. A plugin updated before being enabled has no copy kept by nexya.

How many previous versions are kept?

Two, for each plugin and theme.

Do I need nexya Pro to roll back to the previous version?

No, manual rollback is free. nexya Pro adds automatic rollback for updates that break the site.

Does nexya fix the Contact Form 7 6.2 Composer conflict?

No. It allows you to restore the previous version so the site works, but fixing the conflict is up to the plugin developer or your own Composer setup.

The modules in this post

nexya maintenance nexya security nexya hub

Try nexya Pro free for 7 days

Every module, forms, newsletters and the page cache, on your site. No commitment.

See the plans Or discover the free version