WordPress

WordPress broke after an update: a step-by-step recovery guide

In this article10 sections

You clicked “Update” on a plugin, a theme or WordPress itself. Now the site shows “Briefly unavailable for scheduled maintenance” and never leaves that state, or a blank white page, or “There has been a critical error on this website”. Visitors are seeing it. Your heart rate has gone up.

Almost every failed WordPress update falls into a handful of patterns, and almost all of them are recoverable in minutes once you stop guessing and read the actual error. This guide gives you the order: protect what you have, find the error, apply the fix that matches, and update more safely next time.

Step 0: Do not make it worse

Before you change anything:

  1. Take a copy of the current state, even though it is broken: the files and the database. If you have SSH, a quick archive is enough:
cd /var/www/example.com
tar czf ~/site-broken-$(date +%F-%H%M).tar.gz .
wp db export ~/db-broken-$(date +%F-%H%M).sql

On a host without SSH, use the control panel’s backup tool or your host’s snapshot feature. A broken copy is still the starting point for any later recovery.

  1. Check whether you have a recent good backup and note its date. You may not need it, but you should know whether you can fall back.
  2. Do not run the update again and do not click around in the admin trying things. Repeating a half-finished update often makes the state worse.

Step 1: Read the error instead of guessing

WordPress hides the real error from visitors on purpose. Turn on logging, without showing errors on the page, by adding these lines to wp-config.php above the line that says “That’s all, stop editing”:

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

Reload the broken page once, then read the log:

tail -n 30 wp-content/debug.log

Also look at the web server and PHP logs, which often show errors that WordPress never gets to log:

sudo tail -n 30 /var/log/nginx/error.log
sudo tail -n 30 /var/log/apache2/error.log
sudo journalctl -u php8.3-fpm --since "1 hour ago" | tail -30

The log line names a file and a line. The path tells you the culprit: wp-content/plugins/some-plugin/... points at a plugin, wp-content/themes/... at a theme. Switch the debug lines off again when you are done.

Pattern A: stuck in maintenance mode

During an update, WordPress creates a file called .maintenance in the site’s main folder, and deletes it when the update finishes. If the update is interrupted (a timeout, a closed browser tab, a crash), the file stays, and the site shows the maintenance message forever.

cd /var/www/example.com
ls -la .maintenance
rm .maintenance

The file starts with a dot, so it is hidden: show hidden files in your file manager or FTP client. Reload the site. Then check what the interrupted update left behind: the plugin or theme that was being updated may be half-installed. Reinstall it from a clean copy:

wp plugin install plugin-name --force
wp theme install theme-name --force

If WordPress core was being updated, reinstall it over the top without touching your content:

wp core download --force --skip-content --version=$(wp core version)
wp core verify-checksums

Pattern B: white screen or “critical error”

This means PHP hit a fatal error while loading WordPress, nearly always in a plugin or theme that has just been updated or no longer matches your PHP version.

Recovery mode. WordPress often emails the site’s administrator address a special link (“Your Site is Experiencing a Technical Issue”) that lets you log in with the faulty plugin or theme paused. Check the mailbox, including spam. Follow the link, deactivate the named plugin or theme, and you are back in.

By hand, with WP-CLI. If the email never came, deactivate everything and see whether the site returns:

wp plugin deactivate --all
wp theme list
wp theme activate twentytwentyfour

(Use a default theme that is installed on your site.) If the site comes back, switch plugins on one at a time until the problem returns:

wp plugin activate plugin-name

Without WP-CLI. Rename the plugins folder through SFTP or the file manager:

mv wp-content/plugins wp-content/plugins.off
mkdir wp-content/plugins

The site loads with no plugins, so log in, then move the folders back one at a time (mv wp-content/plugins.off/plugin-name wp-content/plugins/) and re-activate each in the admin. To rule out the theme, rename the active theme’s folder; WordPress will fall back to a default theme.

Once you know the guilty plugin, read the log line again. Ask: is this plugin compatible with my PHP version (php -v, and the plugin’s page lists the required version)? Was the update itself broken, so that the plugin author’s support forum is full of the same complaint? You then choose: roll back to the previous version of that plugin (download it from the plugin page’s “Advanced View” or restore it from backup), wait for a fix, or replace it with something else.

Pattern C: “Database update required”

After a core update you may be sent to a screen asking you to update the database. Run it from the command line if the browser times out:

wp core update-db

If it fails with a table or permission error, the log has the line; check that the database user still has full rights on the database.

Pattern D: the update did not apply or stopped halfway

Look for environmental causes before blaming WordPress:

  • Disk space. df -h and df -i (see the guide on finding what is eating your disk if either is full). A full disk makes updates stop partway, leaving broken files.
  • File ownership and permissions. If WordPress cannot write to its own folders, the update asks for FTP credentials or fails. The web server’s user must be able to write to wp-content (and, for core updates, the rest). A safe baseline is directories 755 and files 644, owned by the user the web server runs as, or by a deployment user with the PHP user in its group.
  • Timeouts and memory. Large updates can exceed max_execution_time or memory_limit; the log will show “Maximum execution time exceeded” or “Allowed memory size exhausted”. Raise the limit for the PHP pool that serves the site, and try again.
  • Corrupted files. wp core verify-checksums and wp plugin verify-checksums --all compare files with the official ones. Reinstall whatever differs.

Pattern E: the admin works, the site looks wrong

A broken layout after a theme or page-builder update is usually cache. Clear every layer, in this order: the page-builder’s own cache, the caching plugin, the server cache (for example NGINX FastCGI), and the CDN (for example Cloudflare). Then reload with the browser cache bypassed (Ctrl+F5). If the layout is still wrong after that, the update changed templates your child theme overrides, and the theme developer’s changelog will say what to adjust.

If nothing works: restore and update in small steps

If you cannot find the cause quickly, restore the last good backup (files and database together, from the same moment). Then update one thing at a time, checking the site after each: first the plugins that cause the least risk, then the theme, then core. When something breaks, you know exactly what did it.

Updating safely next time

  • Back up first, every time, and know how to restore. A backup you have never restored is a hope.
  • Use a staging copy for big changes: core updates, major plugin versions, anything that touches the checkout, forms or membership.
  • Update one component at a time, not all forty at once, and not at your busiest hour.
  • Read the changelog, especially for “requires PHP X” and “breaking change” notes.
  • Keep PHP supported but test before moving. An end-of-life PHP version is a risk; a PHP jump that no plugin supports is a break. Test on staging.
  • Remove what you do not use. Inactive plugins and themes are still code that can be attacked.
  • Watch the site after updates. An uptime check with a keyword on your home page and your checkout page catches a blank screen in minutes, not days.

When it is worth getting help

If the site earns money, a few hours of downtime costs more than the fix. If you cannot find the failing component, if the database is involved, or if you suspect the update was not the real cause (malware often arrives with a “failed update”, see the cleanup runbook for hacked WordPress sites), hand it over before you make changes you cannot undo.

I recover, optimise and maintain WordPress sites. You can see my profile on Upwork, or read about WordPress and Laravel care. If you want hosting that is set up for WordPress from the start, see SiteHarbour WordPress hosting.