WORDPRESS
July 30, 2026

How to Fix the "Briefly Unavailable for Scheduled Maintenance" Error

6 min read
Author
CloudStick Team
DevOps Engineer
Share this article
How to Fix the "Briefly Unavailable for Scheduled Maintenance" Error
CloudStick
Briefly
Unavailable

What "Briefly Unavailable for Scheduled Maintenance" Actually Means

This exact message means WordPress core has written a file named .maintenance to your site's root directory, and every request is now hitting that file before it ever reaches your theme or plugins. It is not a crash, a database error, or a hosting outage — it is WordPress deliberately putting itself into a locked state so that visitors and search engine crawlers do not load a half-updated site while files are being replaced underneath it.

The file is written by the WP_Upgrader class, the same internal machinery that runs every core update, plugin update, and theme update, whether triggered automatically in the background or by you clicking "Update Now" in wp-admin. Before it starts copying new files over old ones, WP_Upgrader calls a maintenance mode helper that drops a PHP file at either wp-content/.maintenance or the site root .maintenance, depending on the WordPress version and the type of update running. That file contains a single timestamp and a short snippet that WordPress checks on every page load: if the file exists, show the "Briefly unavailable for scheduled maintenance. Check back in a minute." message and stop processing the request. Once the update finishes, WP_Upgrader is supposed to delete the file it created, and the site comes back instantly. The message you are seeing means that last step did not happen.

The Built-In 10-Minute Auto-Clear Logic (And Why It Fails)

WordPress core has shipped a safety net for exactly this situation for a long time now: the maintenance check function compares the timestamp inside .maintenance against the current time, and if more than 10 minutes have passed, it ignores the file and lets the request through as normal. In theory this means an abandoned .maintenance file should never lock you out for more than 10 minutes, no matter what went wrong during the update.

In practice that timer only protects you from the message reappearing on every request past the 10-minute mark — it does not remove the file itself, and it does not help if the underlying update process is still technically alive and rewriting the timestamp, or if something else entirely is short-circuiting the check. The three most common real-world failures are: the HTTP request that triggered the update was killed by a browser timeout or a load balancer before WP_Upgrader finished, leaving files partially copied and the maintenance flag orphaned; PHP hit max_execution_time mid-update on a large plugin or theme package and was terminated by PHP-FPM, which cuts the script off before it reaches its own cleanup code; or the process was OOM-killed by the kernel because a memory-hungry update (common with page builders and WooCommerce extensions) exceeded the available memory for that PHP-FPM worker. In all three cases, the .maintenance file is left behind, and depending on server load and caching, some requests can keep showing the stale message even past the theoretical 10-minute window.

Verify The .maintenance File Before Touching Anything

Confirm the file actually exists and check how old it is before assuming it is safe to remove — this single check tells you whether an update is still plausibly running or has clearly been abandoned. On a typical server layout the file sits at the WordPress root inside your site's application directory:

ls -la /home/<user>/apps/<site>/.maintenance
# -rw-r--r-- 1 <user> <user> 21 Jul 30 09:14 .maintenance
cat /home/<user>/apps/<site>/.maintenance
# <?php $upgrading = 1753858440; ?>
date -d @1753858440
# compare this timestamp against the current time

The $upgrading value inside the file is a Unix timestamp of the moment the update started, which is exactly what WordPress core compares against on every request to decide whether to enforce the 10-minute lock. If that timestamp is more than a few minutes old and no update job appears in your process list, you are almost certainly looking at an orphaned file rather than a live update. If the timestamp is recent, or you can see a wp-cron or WP-CLI update process still active for that site, give it more time before doing anything.

Safely Removing The File Once No Update Is Mid-Write

Deleting .maintenance is safe as soon as you have confirmed no update process is actively writing files, because the file itself is only a flag — it holds no state that WordPress or any plugin depends on afterward. Removing it does not undo or roll back an in-progress update; it simply stops WordPress from enforcing the lock on subsequent requests.

rm /home/<user>/apps/<site>/.maintenance
# reload the site — the message should be gone immediately
TIP

After removing the file, immediately check that the plugin or theme the update was touching actually finished installing — look at its version number in wp-admin, or compare file timestamps in wp-content/plugins/<plugin>/ against the release date of the version you expected. An interrupted update can leave the file gone but the plugin itself half-copied, which is a separate problem from the maintenance message and worth catching right away.

CloudStick's WordPress Manager runs core, plugin, and theme updates through the dashboard with visible progress tracking rather than firing a single unmonitored HTTP request, which meaningfully reduces the chance of an update getting silently interrupted in the first place and leaving a stale .maintenance file behind.

Preventing Recurrence With max_execution_time

Large plugin and theme packages are the most common repeat offender, and the fix is to give PHP-FPM enough execution time to let the update finish and clean up after itself rather than getting killed partway through. Check the current limit in the site's PHP-FPM pool configuration:

grep max_execution_time /etc/php83cs/fpm-pools.d/<sitename>.conf
# php_admin_value[max_execution_time] = 30
# raise it for update-heavy sites, then reload the pool
systemctl reload php83cs-fpm

A default of 30 seconds is fine for normal page loads but is often too tight for unpacking a multi-megabyte theme or a plugin with a large bundled library, especially on a busy server. Raising the value in the pool file at /etc/php83cs/fpm-pools.d/<sitename>.conf gives WP_Upgrader room to actually complete its cleanup step and delete .maintenance itself, instead of getting cut off mid-write. To recap: the message means a .maintenance file is present and its 10-minute self-expiry did not fire correctly, usually because the update process was killed by a timeout, an out-of-memory event, or an interrupted request; verify the file's age at /home/<user>/apps/<site>/.maintenance before touching it, delete it once you are confident nothing is still writing to the site, and raise max_execution_time so the next large update finishes cleanly on its own.

Leave a comment
Full Name
Email Address
Message
Contents