Briefly unavailable for scheduled maintenance: how to unstick it

PlatformWordPress Doing it yourself5 to 15 minutes Checked

Written and checked by Sajid, Founder & Web Engineer

The short answer

WordPress shows that message while it updates, by creating a file called .maintenance in the site folder. Normally it deletes the file when the update finishes. If an update stalled or failed, the file is left behind and the whole site stays in maintenance mode. Deleting that one file removes the message at once. No content is lost.

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

1
An update stalled or was interrupted

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.

2
Several updates at once

How to tell: Updating many plugins together makes a timeout more likely, which leaves the file behind.

3
A plugin or theme update that errored

How to tell: The update hit a PHP or memory error partway through and stopped.

4
A low memory or time limit on the host

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. 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. 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. 3

    Reload the site and the dashboard

    Refresh the front of the site and wp-admin. Both should load normally again.

  4. 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. 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. 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.
Fix it for me

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.

Not sure where your site stands?

Paste the address. Security, speed, SEO and how old the tech is, in about ten seconds.

Still broken? We can fix it.