Is this your problem?
- Every page shows "Briefly unavailable for scheduled maintenance. Check back in a minute."
- wp-admin shows the same message, so you cannot log in
- It started during or right after a plugin, theme or core update
- It has been far longer than a minute and nothing changes on refresh
- The update bar stalled, or the connection dropped mid-update
What usually causes it
How to tell: The browser tab closed, the connection dropped, or the server timed out while updating, so WordPress never finished and never removed the file.
How to tell: Updating many plugins together makes a timeout more likely, which leaves the file behind.
How to tell: The update hit a PHP or memory error partway through and stopped.
How to tell: A tight PHP limit makes updates fail partway, which is what leaves maintenance mode stuck.
Before you touch anything
- You will need access to the site files: the host file manager, or SFTP.
- Note which update was running when it stuck; you will want to finish or redo it afterwards.
How to fix it, step by step
-
1
Open the site folder
In the host file manager or over SFTP, open the main WordPress folder, the one that holds wp-config.php, wp-content and wp-admin.
-
2
Delete the .maintenance file
Find the file named .maintenance in that folder and delete it. It starts with a dot, so turn on "show hidden files" if you cannot see it. The site comes back the moment it is gone.
-
3
Reload the site and the dashboard
Refresh the front of the site and wp-admin. Both should load normally again.
-
4
Finish the update that stuck
The interrupted update may be half done. In wp-admin go to Updates and run it again so the plugin, theme or core is properly up to date.
-
5
If the update keeps failing
Raise the PHP memory and time limits, or ask your host, then update one item at a time rather than all at once. A single failing plugin can be updated by replacing its folder manually.
-
6
Check the site after
Open a few pages and the dashboard to confirm the finished update did not leave anything broken.
Stop and get help if
- The .maintenance file is gone but the site still shows an error, which means the update broke something and is a different problem.
- You cannot reach the files at all and the host cannot help quickly, while the site is a shop losing orders.
- Updates keep failing and sticking, which points at a hosting limit that needs raising.
Stop it happening again
- Update one plugin at a time, not all together, and wait for each to finish.
- Back up before updating, and update on a copy first for a big site.
- Keep PHP memory and time limits high enough that updates do not time out.
- Do updates on a stable connection, and do not close the tab mid-update.
Questions people ask
Will deleting .maintenance lose anything?
No. It is a temporary flag, not content. Deleting it only takes the site out of maintenance mode.
I cannot see the .maintenance file. Why?
It is hidden because it starts with a dot. Turn on "show hidden files" in the file manager, or in your SFTP client, to see it.
It came back after I deleted it. Why?
An update is still trying and failing, re-creating the file. Finish or undo that update, and raise the host limits so it can complete.
Is this a hack?
No. It is a normal WordPress update that did not finish cleanly.