Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

WordPress "Briefly unavailable for scheduled maintenance": when the update message stays

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

When WordPress is updating, it temporarily puts the site into maintenance mode. The default message from core is: "Briefly unavailable for scheduled maintenance. Check back in a minute." That short outage is normal. If the message stays after the update has finished, the Updating documentation says to check for a .maintenance file in the WordPress root and remove it once you have confirmed the update is no longer running. Core's wp_is_maintenance_mode() ignores a .maintenance file whose $upgrading time is older than 10 minutes, so an old file alone is not what keeps the message up; look then for a cache, a host-level maintenance page, a custom wp-content/maintenance.php, or an update that is still rewriting files.

What the symptom means

wp_maintenance() sends HTTP status 503, sets Retry-After: 600, and by default dies with that maintenance string (unless wp-content/maintenance.php replaces it). wp_is_maintenance_mode() looks for .maintenance in the WordPress root. That file holds $upgrading as the time it was created. If $upgrading is older than 10 minutes, WordPress treats maintenance as over even if the file is still present.

The Updating WordPress documentation says WordPress temporarily puts the site into maintenance mode during an update, and that this is normal for a short time. Under Failed Updates it says: if the site remains in maintenance mode after a failed update, check for .maintenance in the WordPress root and remove it with FTP or the host's file manager once you have confirmed the update is no longer running.

The Common WordPress errors handbook describes the same stuck state and shows the sentence with an extra "Please": "Briefly unavailable for scheduled maintenance. Please check back in a minute." Treat that as the handbook's wording. The default string in wp_maintenance() does not include "Please".

Likely causes

Cause What you see How to confirm
Update still running Maintenance message for a short time; progress in wp-admin Wait; keep the update tab open as the Updating doc asks
Failed or interrupted update left a fresh .maintenance Maintenance message while $upgrading is under 10 minutes old; no update progress File .maintenance exists in the site root and is recent
Custom maintenance.php drop-in Different maintenance page body File wp-content/maintenance.php exists
$upgrading older than 10 minutes File present but site already serves normally wp_is_maintenance_mode() logic treats it as over

Prove the cause before changing anything

All of these are read-only.

1. Read the on-screen sentence. Match it to the default core string or to a custom drop-in.

2. Confirm whether an update is still running in Dashboard → Updates or in the tab that started Update Now. The Updating documentation says to keep that page open until the update finishes.

3. List the site root over SFTP or SSH, including hidden files, and look for .maintenance.

Fix

Remove .maintenance only when the update is no longer running.

Save a copy of .maintenance first. From the WordPress root:

cp .maintenance maintenance-before.txt

If the file is absent, stop; the message is coming from somewhere else (for example a host-level maintenance page).

Risk: the next command deletes .maintenance from the WordPress root while WordPress uses that file to signal maintenance mode. If an update is still writing core files, visitors can hit a half-updated site and the update can fail in a worse state.

Delete only .maintenance with your SFTP client, host file manager, or:

rm .maintenance

No back-out is required for removing a stuck .maintenance file: WordPress recreates it on the next update. Copying maintenance-before.txt back only restores maintenance mode if that file's $upgrading time is still under 10 minutes old; an older restored file is ignored by wp_is_maintenance_mode().

After a failed auto-upgrade that you finish manually, the Updating documentation's Step 1.5 also says to delete .maintenance so the failed-update nag goes away, then continue the manual update steps.

Example (illustrative): example.com still shows a maintenance page an hour after a plugin bulk update. Because a .maintenance file older than 10 minutes no longer puts the site into maintenance mode on its own, look for a cache serving the old page, a host-level maintenance page, a custom wp-content/maintenance.php, or an update still running. If a fresh .maintenance is present and no update is running, the Updating documentation's remove-.maintenance step clears core maintenance mode.

Confirm the fix

  1. The site root no longer contains .maintenance.
  2. The front end serves the site, not the maintenance message.
  3. wp-admin loads so you can finish any incomplete update.

What to watch afterwards

  • The Updating documentation points at filesystem permission problems when one-click updates fail. Avoiding large batches of plugin updates in one click on a slow host is this article's own suggestion, not a statement on that page.
  • After recovery, complete any unfinished core or plugin update.
  • If the message returns immediately, look for a host maintenance page outside WordPress. Checking for automation that recreates .maintenance is this article's own suggestion.

Risks and limits

  • Deleting .maintenance during an active update can expose a broken tree.
  • A custom wp-content/maintenance.php changes the body; removing .maintenance still ends core maintenance mode.
  • The 10-minute expiry in wp_is_maintenance_mode() can clear the behaviour while leaving a stale file on disk.

Sources