WordPress Stuck in Maintenance Mode: Causes and Quick Fixes
Remove the .maintenance file to get the site back in a minute, then finish the interrupted update properly: what stopped it, how to complete it, what to check if the message stays, and how to prevent a repeat.

"Briefly unavailable for scheduled maintenance. Check back in a minute." WordPress shows that line to every visitor while it installs an update, and removes it seconds later. When the line is still there several minutes later, you have WordPress stuck in maintenance mode: an update started, something interrupted it, and the flag that closes the site was never taken down.
Getting the site back takes about a minute, and that comes first. Read on afterwards, because the stuck flag is only the visible half of the problem. The other half is an update that stopped part of the way through.
Delete the .maintenance file to get the site back
- Connect to the server with SFTP or open the file manager in your hosting panel.
- Go to the WordPress root, the folder that contains
wp-adminandwp-includes. - Make hidden files visible. Names that start with a dot are hidden by default. In FileZilla the option is Server > Force showing hidden files, and in the cPanel File Manager it is under Settings.
- Delete the file named
.maintenance. It holds one line with a timestamp and nothing you need to keep. - Reload the site in a private window.
Over SSH, WP-CLI does the same thing:
wp maintenance-mode status
wp maintenance-mode deactivate
One caution. If you started the update a moment ago, give it a few minutes before you step in. Removing the flag while files are still being copied lets visitors into a site that is half old and half new.
If the message is still there afterwards
- A cache kept a copy. Purge the page cache, the server cache and the CDN. Running
curl -Iagainst the home page shows whether the origin still answers 503. - The file keeps coming back. Some process is starting the update again: the automatic updater, a host's update tool or a site management service. Pause it, then fix whatever makes the update fail.
- The file was made by hand. A
.maintenancefile that sets the variable totime()is always current and never expires. Delete it. - It is a different maintenance page. A coming-soon plugin, a theme option or a maintenance switch in the hosting panel produces its own screen, usually with different wording. Turn it off where it was turned on.
- You deleted the file from another install. On accounts with several sites or a staging copy, check the path.
What leaves WordPress stuck in maintenance mode
When an update begins, from the dashboard, the automatic updater or WP-CLI, WordPress writes .maintenance with a single line of PHP that records the time:
<?php $upgrading = 1790000000; ?>
On every request WordPress looks for that file. If the timestamp is less than ten minutes old, it stops loading, sends the maintenance message with an HTTP 503 status and a Retry-After header, and exits. When the update finishes, WordPress deletes the file. The logic is short enough to read in the reference for wp_is_maintenance_mode().
The ten-minute rule has a useful consequence. WordPress ignores a flag older than that, so an interrupted update by itself locks visitors out for ten minutes at most. A site that has shown the message for hours is not waiting on an old file. Something else is going on, and the checks listed under the quick fix cover the candidates.
As for why the flag was left behind in the first place, an update is a sequence: download the package, unpack it into a temporary folder, remove the old version, copy the new one into place, clean up. A stop at any point leaves the flag behind. The usual interruptions:
- The browser tab was closed or you clicked away while a bulk update was still running.
- PHP ran out of time or memory while unpacking a large plugin on slow hosting.
- The disk was full, or the account was over its quota, so the package could not be unpacked.
- The download failed because the server could not reach the update source.
- File ownership was wrong. WordPress could remove the old folder and was not allowed to write the new one.
- Two updates collided: an automatic update began while you were running one by hand.
The PHP error log for the minute the update ran usually says which of these it was. Knowing matters, because a full disk or a time limit will interrupt the next attempt in the same way.
Finish the update that was interrupted
The site is now in an in-between state, so take a backup of the files and the database before you go further. If the next step makes things worse, you want to be able to return to exactly this point.
Plugins and themes
Open Dashboard > Updates to see what is still pending, and the Plugins screen for a notice that a plugin was deactivated because its file does not exist. That notice means the old folder was removed and the new copy never arrived. Install the plugin again from Plugins > Add New and activate it. Its settings are in the database and are still there. For everything else, run the pending updates again, one at a time.
Current WordPress versions also keep a temporary copy of the old plugin or theme in wp-content/upgrade-temp-backup while an update runs, and put it back if the update fails, so you will often find the previous version still in place. Leftover files inside wp-content/upgrade are unpacking debris and can be deleted.
WordPress core
If core was the update that stopped, check the files before you trust them:
wp core verify-checksums
wp core download --version=$(wp core version) --skip-content --force
wp core update
wp core update-db
The first command reports core files that do not match the official release. If any fail, the second fetches a clean copy of the version the site reports and overwrites the core files, leaving wp-content and wp-config.php alone. The third brings core up to the current release, and the fourth applies pending database changes. Without SSH, use the "Re-install" button on Dashboard > Updates, then follow the "Database Update Required" prompt if it appears. The official guide to updating WordPress describes the manual route for cases where the dashboard cannot do it.
"Another update is currently in progress"
Core updates set a lock in the database so that two cannot run at once. An interrupted update leaves the lock in place, and it expires without help after fifteen minutes. To clear it immediately:
wp option delete core_updater.lock
Then test what the site is for: a form submission, a login, a test order. If the finished update itself broke something, see how to roll back a WordPress update.
Prevent it next time
Most stuck updates are avoidable with a few habits.
- Update in small groups, the plugins the site depends on one at a time, and stay on the page until WordPress reports that it has finished.
- Check free disk space and the account quota before a large update.
- Use WP-CLI over SSH for big jobs. It does not depend on a browser tab or on the web server's time limit.
- Know when automatic updates run so that manual updates do not overlap with them.
- Take the backup before you start. The full routine is in our checklist for updating WordPress safely.
You can also replace the default message. If a file named maintenance.php exists in wp-content, WordPress shows it in place of the standard line. Almost nothing of WordPress is loaded at that point, so the file must be plain PHP and HTML, and it has to send the 503 status itself:
<?php
http_response_code( 503 );
header( 'Retry-After: 600' );
?>
<!doctype html>
<title>Back shortly</title>
<p>We are updating the site. Please try again in a few minutes.</p>
A site that sticks at every update needs more than a deleted file
Deleting the file and running the update again is safe for any site owner. It is time for help when the site gets stuck at nearly every update, which points to hosting limits or file ownership that need correcting once and properly. The same goes for core files that fail the checksum test while the site throws errors, for a store whose database update stopped in the middle, and for any of this happening without a recent backup. Updates done on staging first, with someone watching the result, are the core of our WordPress maintenance plans, and sites built on other stacks get the same care under maintenance and support.
Frequently asked questions
Is it safe to delete the .maintenance file?
Yes. It contains a timestamp and nothing else, and WordPress creates a new one whenever it needs it. The only risk is deleting it while an update is still copying files, so wait a few minutes if the update has only just started.
How long should maintenance mode normally last?
Seconds for a small plugin and a minute or two for a large one or for core. WordPress itself stops honoring the flag after ten minutes, so anything longer than that is a fault, not a slow update.
Does maintenance mode hurt search rankings?
Not when it is brief. The 503 status and the Retry-After header tell crawlers the outage is temporary and that they should come back later. A site that answers 503 for many hours, or does so often, is a different matter and should be fixed promptly.
Can I switch maintenance mode on deliberately?
Yes, with wp maintenance-mode activate, and off again with deactivate. Because the core flag lapses after ten minutes, longer planned work is better served by a maintenance plugin or a page configured at the server.
Add worldwincoder.com as a preferred source on Google, or open this article in your AI assistant to use it as a source.
