What the message means

When WordPress installs an update to core, a plugin or a theme, it first writes a small file called .maintenance into the WordPress root folder, the one that holds wp-config.php. The file holds one line with the time the update started:

<?php $upgrading = 1764000000; ?>

While that file exists and its timestamp is less than 10 minutes old, WordPress answers every request, wp-admin included, with “Briefly unavailable for scheduled maintenance. Check back in a minute.” It sends the page with HTTP status 503 and Retry-After: 600, so browsers and search engines know it is temporary. When the update finishes, WordPress deletes the file and the site comes back.

On a healthy server visitors see this for seconds. It sticks when the PHP process running the update ends before it reaches the step that deletes the file: a PHP time limit or memory limit, a host that stops long requests, a fatal error in the new code, or a server restart in the middle of a bulk update.

Why it sometimes does not clear by itself

WordPress ignores a .maintenance file whose timestamp is more than 10 minutes old (see wp_is_maintenance_mode in the developer reference). So if the message lasts longer than 10 minutes, one of these is usually true:

  • An update keeps starting again. A bulk update moving from plugin to plugin, or automatic updates retrying, writes a fresh timestamp each time.
  • The file holds time() instead of a number. Some snippets and tools write <?php $upgrading = time(); ?>, which is always “now”, so the message never expires.
  • Something else shows the page. A maintenance plugin, a wp-content/maintenance.php drop-in, or the host’s own maintenance screen can look the same.
  • A cache kept a copy. Page caches rarely store a 503, but a CDN or proxy set to serve stale pages can.

How to fix it, step by step

1. Wait two minutes, then reload past the cache

Large plugins such as WooCommerce or a page builder can take a minute to unpack on a slow host. Reload the site with a query string, for example https://example.com/?nocache=1, so a page cache does not answer for WordPress. If the message is gone, nothing needs fixing.

2. Delete the .maintenance file

Use whichever access you have:

  • SFTP or FTP. Connect, open the WordPress root folder (often public_html, www or a folder named after the site), switch on hidden files (in FileZilla: Server, Force showing hidden files), and delete .maintenance. Do not touch .htaccess next to it.
  • Your host’s file manager. In cPanel’s File Manager, open Settings and tick “Show Hidden Files (dotfiles)”, then delete the file from the root folder.
  • WP-CLI over SSH. From the WordPress root:
wp maintenance-mode status
wp maintenance-mode deactivate

deactivate removes the same file. If WP-CLI reports maintenance is not active but visitors still see the message, the page comes from a plugin, a drop-in or a cache, not from WordPress’s update.

What this changes: only the message. How to undo it: nothing to undo; WordPress writes the file again on the next update.

3. Find out what the update was doing

The site is back, but the update it was running may not have finished.

  • Dashboard, Updates lists what is still waiting. A plugin that was mid-update often still shows its update.
  • Plugins may show the plugin switched off. WordPress deactivates an active plugin while it replaces it and switches it back on only when the install worked.
  • wp-content/upgrade/ holds the unpacked update while it installs; leftover folders there mean an update stopped partway. Since WordPress 6.3, wp-content/upgrade-temp-backup/ holds the previous copy of a plugin or theme during its update and restores it if the update fails (the 6.3 rollback note).

With WP-CLI:

wp plugin list --update=available
wp plugin list --status=inactive
wp core verify-checksums

The last command compares core files with WordPress.org’s checksums, which tells you whether a core update stopped halfway.

4. Finish or redo the interrupted update

Run the update that was in progress again, on its own. If the plugin is missing from the list or causes errors, its folder was only partly copied: reinstall it over the top.

wp plugin install woocommerce --force

Add --version= with a version number to put back a specific version instead of the latest. For a core update that stopped halfway, use Dashboard, Updates, Re-install version or:

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

That rewrites WordPress’s own files and leaves wp-content and wp-config.php alone. If WordPress then shows “Database Update Required”, click the button to finish the core update.

5. Check the site the way a visitor would

In a private window, load the home page, the contact page and, on a shop, add a product to the cart and go to the payment step. Clear the page cache (and the CDN, if there is one) so nobody keeps getting a stored copy. Log in to wp-admin and make sure the plugin you updated is active.

6. Make it less likely next time

  • Update large plugins one at a time on slow hosts instead of in one bulk run.
  • Ask the host for enough PHP time and memory for updates (max_execution_time and memory_limit; WordPress also reads WP_MEMORY_LIMIT from wp-config.php).
  • Update outside the client’s busy hours, and keep a recent backup from the host.

Our guide to updating plugins without breaking the site covers the checks before and after each update.

What can go wrong

  • Deleting the file while the update is still copying. Visitors then reach a half-copied plugin. Wait first, and delete only when nothing has changed for a few minutes.
  • A critical error once the message is gone. The plugin’s files are incomplete. Rename its folder in wp-content/plugins/ over SFTP (for example woocommerce to woocommerce-off) to switch it off, then reinstall it. WordPress also emails the site’s admin address a recovery mode link when a plugin causes a fatal error.
  • Deleting the wrong dot file. .htaccess sits in the same folder and holds the site’s rewrite rules. Delete only .maintenance.
  • A site that is down for another reason. If the message is gone and the site still fails, work through what to do when a website is down.

How to explain it to the client

Keep it short and factual. For example, for the demo client Harbour Bakery (harbourbakery.example):

On Tuesday at 21:10 the site showed a “back in a minute” notice for about 15 minutes while a plugin update was installing. The update stopped partway, so we cleared the notice, finished the update and checked the order form and checkout. No orders or content were lost.

Say when it happened, how long, what you did and what you checked. If it happened during the day, say what you changed so the next update runs at night.

How Keptstone handles it

Keptstone’s safe updates clean up after every update: the connector removes a stuck .maintenance file and empties the object cache and common page caches. Keptstone then loads the site’s key pages again, and a page that still shows “Briefly unavailable for scheduled maintenance” counts as broken. After a second look ten seconds later, a plugin or theme update that left a page broken is rolled back from the restore point made before it, through the connector, without FTP details. WordPress core has no restore point, so a broken core update alerts the agency at once instead.

Between updates, the uptime check that runs every minute reads the page, not just the status code: the maintenance message counts as down (“Stuck in WordPress update maintenance”), and Keptstone checks from other places before alerting anyone. Safe updates and monitoring are in the Care plan, $2 a site a month (pricing). Keptstone does not run backups; it records the host’s.

Questions

How long does WordPress maintenance mode last during an update?

Usually a few seconds to a minute per plugin, theme or core update. WordPress stops honoring a .maintenance file once its timestamp is 10 minutes old, so a message that lasts longer means something keeps writing the file or something else is showing the page.

Is it safe to delete the .maintenance file?

Yes, once the update has stopped running. The file only switches the message on, so deleting it changes nothing else. Check the update that was in progress afterwards, because the plugin it was replacing may be half installed.

Where is the .maintenance file?

In the WordPress root folder, next to wp-config.php and wp-login.php. Its name starts with a dot, so many FTP clients and file managers hide it until you switch on hidden files.

Does the maintenance message hurt SEO?

WordPress sends it with HTTP status 503 and a Retry-After header, which tells search engines the page is temporarily unavailable. A few minutes does no harm. Google slows its crawling for server errors and drops pages that keep returning them, so do not leave a site stuck for days.