All guides
Troubleshooting guide Updates

WordPress Stuck in Maintenance Mode: How to Remove the .maintenance File

Your site shows 'Briefly unavailable for scheduled maintenance. Check back in a minute.' and never comes back. Here is the 60-second fix and how to stop it happening again.

Arjun Mehta Published June 22, 2026 Last reviewed June 22, 2026 9 min read Step-by-step walkthrough
Reviewed and tested by the WPRescue team on a real WordPress install before publishing. How we test fixes
WordPress maintenance mode message shown to visitors

What's Happening

When you update plugins, themes, or WordPress core, WordPress drops a tiny file named .maintenance into your site's root folder. That file is what triggers the 'Briefly unavailable for scheduled maintenance' message visitors see. If an update is interrupted (timeout, browser tab closed, bad plugin, memory limit hit), the .maintenance file is never deleted and the site stays in maintenance mode forever.

It is one of the most panic-inducing messages a site owner can see. You click 'Update All' on the plugins screen, the browser tab spins for a while, and the next time you load the homepage you get a single line of text: 'Briefly unavailable for scheduled maintenance. Check back in a minute.' A minute passes. Then ten. Then an hour. The site never comes back.

I have walked dozens of clients through this exact moment. The fix is almost always the same and it almost always takes under two minutes. There is no database to repair, no plugin to reinstall, no support ticket to file. WordPress simply forgot to clean up after itself, and you have to delete one small file by hand.

This guide explains why the maintenance message gets stuck, where the lock file lives, exactly how to remove it on any host, and the configuration changes that stop it happening on your next bulk update. I have also included the three follow-up checks I run after every recovery so the site does not come back broken in a different way.

Why WordPress Gets Stuck in Maintenance Mode

Every time WordPress installs or updates a plugin, theme, or core file, it writes a tiny PHP file called .maintenance into your site root. That file contains a single timestamp. While it exists, every page request returns the maintenance message instead of loading the site. When the update finishes successfully, WordPress deletes the file and the site returns to normal.

The trouble starts when the update does not finish. A PHP script timeout, a memory limit error, a closed browser tab, or a plugin that crashes mid-install will all leave the .maintenance file behind. WordPress assumes the update is still running and keeps showing the message indefinitely. The site is not actually broken. It is just waiting for permission to come back.

Step 1: Open Your Site Root Over SFTP or File Manager

You need direct file access to delete .maintenance. The WordPress dashboard cannot help because you cannot reach it. Use SFTP with an app like FileZilla or Cyberduck, SSH if your host supports it, or the file manager built into cPanel, Plesk, or your managed host's dashboard.

Navigate to the folder that contains wp-config.php. On shared hosting this is usually public_html or www. On WP Engine it is sites/your-site/. On Kinsta it is public/. If you see wp-admin, wp-content, and wp-includes folders, you are in the right place.

Step 2: Find the .maintenance File

The file starts with a dot, which means some file managers hide it by default. In FileZilla, go to Server > Force Showing Hidden Files. In cPanel File Manager, click Settings in the top right and tick 'Show Hidden Files'. In Cyberduck, press Shift+Cmd+. to toggle dotfiles.

Once hidden files are visible, .maintenance will sit alongside wp-config.php. It is usually a few bytes in size. If you do not see it at all, the lock is gone already and your problem is somewhere else, most likely cache.

textWhat your site root looks like when the lock file is present.
public_html/
├── .htaccess
├── .maintenance      <-- delete this one
├── index.php
├── wp-config.php
├── wp-load.php
├── wp-admin/
├── wp-content/
└── wp-includes/

Step 3: Delete .maintenance and Reload the Site

Right-click the file and choose Delete. There is no recycle bin to worry about and no confirmation step that matters. As soon as the file is gone, the next page request to your site will skip the maintenance check and load normally.

Open the homepage in an incognito window to test. If you still see the maintenance message, do not panic, it is almost certainly a cached copy. Purge your caching plugin, purge your CDN if you use Cloudflare or BunnyCDN, and try again.

File manager view showing the WordPress site root with the .maintenance file ready to delete
Delete .maintenance from the site root. The site comes back on the next page load.

Step 4: Finish the Interrupted Update

Removing .maintenance only ends the message. It does not finish whatever update was running when the failure happened. Log into wp-admin, go to Dashboard > Updates, and look for any plugin or theme that still shows an available update. Re-run those updates one at a time so you can spot the offender if it happens again.

Then visit each section of the site, public and admin, to make sure nothing else is broken. A half-applied update can leave a plugin in a weird state where the front end works but a settings page throws an error.

Step 5: Prevent It From Happening on the Next Bulk Update

Almost every stuck maintenance case I have seen traces back to one of three causes: a PHP timeout, a memory limit hit, or 30 plugins being updated in one click. You can fix all three in about five minutes.

  • Raise PHP max_execution_time to 300 seconds in php.ini or via your host's PHP settings panel.
  • Raise memory_limit to 256M in php.ini or by adding define('WP_MEMORY_LIMIT', '256M'); to wp-config.php.
  • Update plugins in small batches of five. It takes 30 seconds longer and avoids the bulk-update timeout entirely.
  • Take a complete backup before bulk updates with UpdraftPlus or your host's snapshot tool.
  • Update on a fast, wired connection if you can. Closing a browser tab in the middle of a bulk update is the single most common cause of this issue.

When the .maintenance File Keeps Coming Back

If you delete the file and WordPress immediately recreates it, the update process is still running in the background. Wait two minutes and check again. If the file is still being recreated 10 minutes later, an auto-update cron job is probably looping on a broken plugin.

In that case, rename /wp-content/plugins to /wp-content/plugins-off, delete .maintenance again, and load the site. With all plugins disabled the auto-updater has nothing to chew on. Then rename the folder back and reactivate plugins one at a time to find the one that keeps crashing the updater.

Complete Fix Checklist

  1. 1Connect to your site over SFTP, SSH, or your host's file manager and open the public_html or site root folder.
  2. 2Look for a file called .maintenance (yes, with the leading dot) sitting next to wp-config.php and wp-load.php.
  3. 3Delete the .maintenance file. The site comes back instantly on the next page load, no cache flush required.
  4. 4Log into wp-admin and finish whatever update was interrupted. Updates > Re-run any plugin or theme update that was in progress.
  5. 5Increase PHP max_execution_time to 300 and memory_limit to 256M so the next bulk update has room to finish without timing out.

Quick Tips

  • If the file manager hides dotfiles, enable 'Show hidden files' or use SFTP
  • Never close the browser tab during a WordPress update, even if it looks frozen
  • Update plugins in small batches of 5 or fewer to reduce the chance of a timeout
  • Take a database and files backup before the next bulk update

Frequently Asked Questions

What does 'Briefly unavailable for scheduled maintenance. Check back in a minute' actually mean?
WordPress shows this message whenever it is in the middle of installing or updating something. Core, a plugin, or a theme is being written to disk, and WordPress puts up the message so visitors do not hit a half-updated site. If the update finishes cleanly, the message disappears in seconds. If the update is interrupted, the lock file stays in place and the message gets stuck.
Where exactly is the .maintenance file located?
In the root folder of your WordPress install, the same folder that contains wp-config.php, wp-load.php, and wp-settings.php. On most shared hosts that folder is called public_html. On managed hosts it might be sites/your-site/files or app/public. The file name starts with a dot, so file managers that hide dotfiles will not show it until you flip on 'show hidden files'.
I deleted .maintenance but the site is still showing the message. What now?
Three usual suspects. One, your caching plugin or CDN is still serving the cached maintenance page, so purge both. Two, your browser cached it, so test in incognito. Three, the update process is still actually running, in which case wait two to three minutes and re-check by SFTP to make sure WordPress has not recreated the file.
Can I prevent this from happening on future updates?
Yes. Update plugins five at a time instead of clicking 'update all'. Raise max_execution_time to 300 seconds and memory_limit to 256M in php.ini or wp-config.php. Avoid running updates over flaky Wi-Fi. And keep a recent backup so a stuck update is never more than a 10-minute fix.
Is there a plugin that can recover from this automatically?
Some hosts run a watchdog that deletes .maintenance after 10 minutes if no progress is made. Plugins like WP Maintenance Mode are for intentional maintenance pages, not for clearing a stuck update lock. The .maintenance lock file is owned by WordPress core, and the fastest fix is to delete it manually.
Will I lose data if I delete the lock file mid-update?
Your posts, users, and uploads are safe because they live in the database, not the lock file. The risk is that a plugin update was half-applied, so after you delete .maintenance, go to Dashboard > Updates and re-run any update that did not complete. WordPress is smart enough to redo the file copy cleanly.

Related Guides