Blog

Automatic WordPress update: the site crashes during the night, how to roll back

When a WordPress automatic update breaks the site, you can find the plugin that changed within minutes and restore it to its previous version. You can then keep automatic updates enabled, knowing that the next rollback is already prepared.

Automatic WordPress update: the site crashes during the night, how to roll back

Key points

  • A WordPress automatic update installs the new version but does not keep the old one.
  • The WordPress email and error message almost always name the faulty plugin.
  • The free Maintenance module keeps the two previous versions of each plugin and each theme.
  • nexya Pro automatically rolls back an update that breaks the site.
  • The module must be turned on before the update: it does not keep a version it hasn't seen pass by.

What an automatic WordPress update does, and why it comes as a surprise

Since WordPress 5.5, every plugin and theme can update itself. An automatic WordPress update runs in the background, often at night, without anyone watching the screen. Most of the time, everything goes smoothly. When it doesn’t, we find out the next day, through a client or a colleague.

On the WordPress.org forums, the same question comes up every week: the site displays a critical error after updating a plugin, how do I roll back? Contact Form 7, security extensions, page builders: none of them are truly immune.

The messages we see then are almost always the same.

  • “There has been a critical error on this website” on the site and in the administration area.
  • A blank page, with no text at all.
  • “Composer detected issues in your platform”: the new version requires a newer PHP version than the one on the server, for example PHP 8.3.
  • A “Fatal error” citing a file in wp-content/plugins/, with the name of the plugin folder.
The Mail module: a reliable sending method so that the WordPress recovery email arrives.
The Mail module: a reliable sending method so that the WordPress recovery email arrives.

Finding the extension that changed

Before touching anything, you need to know which extension moved. WordPress helps you in two ways.

First, after automatic updates, it sends an email to the admin address with a list of what has been updated. Second, when a fatal error occurs, it sends a second email naming the faulty extension and containing a link to recovery mode.

If these emails never arrived, the problem is twofold: the site is crashing, and it doesn’t know how to notify you. This is a practical reason to route your site’s emails through a real sending server. The nexya Mail module sends via SMTP, via an API, or via a connected Gmail or Microsoft 365 account, and keeps a log of every message, along with the reason given by the server when sending fails.

Without an email, the error message itself is often enough: the wp-content/plugins/folder-name/ path points to the extension.

A site that crashes without being able to write to you is two failures, not one.

Returning to the administration area

The recovery mode link received by email opens the admin area while bypassing the faulty extension. This is the simplest path.

Without that link, you still have access to the files via FTP or your host’s file manager: renaming the extension folder in wp-content/plugins/ deactivates it, and the admin area comes back. Do not delete the folder: you will need it to put the correct version back.

While you are fixing the issue, visitors don’t need to see the error. The Maintenance module displays a custom waiting page that you can turn on and off whenever you want.

Reverting to the previous version after an automatic update

  1. 1

    Turn on the Maintenance module

    In the nexya hub, turn on the Maintenance module. From then on, every plugin and theme keeps its previous version before being updated.

    Turn on the Maintenance module
  2. 2

    Identify the faulty plugin

    Read the WordPress email or error message: the folder mentioned in wp-content/plugins/ points to the plugin. If the email didn't arrive, the Mail module log explains why.

    Identify the faulty plugin
  3. 3

    Take the site offline while repairing

    Log into the administration using the recovery mode link, then turn on the Maintenance module's holding page so visitors don't see the error.

    Take the site offline while repairing
  4. 4

    Restore the previous version

    From the Maintenance module, restore the previous version of the plugin. Check the site, then turn off the holding page.

    Restore the previous version

Restoring the previous version with the Maintenance module

This is the part that WordPress doesn’t do on its own: it installs the new version, but doesn’t keep the old one. Once the update is done, rolling back normally requires finding the old archive, uploading it, and replacing the files by hand.

The nexya Maintenance module keeps the previous version of every extension before it is updated, both plugins and themes. The last two versions are preserved. If a problem occurs, you can restore the previous version directly from the module without searching for an archive.

This is free, for as many sites as you want. One condition matters: the module must be turned on before the problematic update takes place. It cannot keep a version it hasn’t seen pass through.

Also, a clearly stated limitation: the module restores a version, it does not diagnose. If the critical error comes from something other than an update, such as a PHP version change at the host or a modified file, you will need to look elsewhere.

  • Two versions kept for every extension and theme.
  • Rolling back is done from the admin area, not via FTP.
  • Free, within the Maintenance module.

Letting nexya Pro automatically undo an update that breaks the site

Free rollback still requires someone to trigger it. If the automatic update happens at three in the morning, the site stays down until you see it.

nexya Pro adds this step: an update that breaks the site is cancelled on its own, and the previous version takes its place back. This is precisely what WordPress automatic updates are missing: they happen on their own, but they don’t undo themselves.

nexya Pro is sold on nexya.dev and keeps the settings of the free plugin as they are.

The Maintenance module, where database cleaning and export are also located.
The Maintenance module, where database cleaning and export are also located.

Keeping automatic updates, with a safety net

Disabling all automatic updates is not the right answer: many updates fix vulnerabilities, and a vulnerable extension left as is poses a greater risk than an hour of downtime.

A few habits reduce the risk without giving up updates. Check the server’s PHP version: a good share of “Composer detected issues” errors come from an extension requiring a newer version. Take a database backup before major updates; the Maintenance module can export it. And keep fewer extensions: every extension removed is one less update that can go wrong.

With the Maintenance module turned on, every update leaves the previous version behind. The next critical error can then be fixed from the administration by restoring this version, rather than waiting for a fix from the author.

  • Let security updates happen.
  • Check the PHP version before accepting a major version.
  • Export the database before a major update.
  • Turn on the Maintenance module before you need it.

FAQ

Should you disable automatic plugin updates?

No, generally speaking. They often fix vulnerabilities. It is better to keep them and have a way to roll back, such as the previous version saved by the Maintenance module.

How many versions does the Maintenance module keep?

The last two versions of each plugin and each theme, kept before each update.

Is the rollback free?

Yes, manually restoring the previous version is free. The automatic rollback of an update that breaks the site is reserved for nexya Pro.

What does "Composer detected issues in your platform" mean?

The new version of the plugin requires a newer PHP version than the server's. Restoring the previous version brings the site back, and then PHP must be upgraded with the host.

Does the module find the cause of every critical error?

No. It restores a previous version, it does not diagnose other causes, such as a PHP change on the host or a modified file.

The modules in this post

nexya maintenance nexya hub nexya mail

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