How to Fix WordPress Stuck in Maintenance Mode

What Is WordPress Maintenance Mode?

When WordPress updates plugins, themes, or the core system, it automatically enters maintenance mode. During this time, visitors see a message like “Briefly unavailable for scheduled maintenance. Check back in a minute.”

This is normal and usually lasts only a few seconds. However, if the update process gets interrupted—by a timeout, server crash, or network issue—WordPress can get stuck in maintenance mode indefinitely. Your site becomes completely inaccessible to everyone, including you.

The technical cause? WordPress creates a file called .maintenance during updates and deletes it when finished. If something goes wrong, that file stays on your server, keeping your site locked.


Common Causes of Stuck Maintenance Mode

  • Update timeout — Plugin or theme update took too long and timed out
  • Server connection lost — Internet connection dropped during the update
  • PHP memory limit reached — WordPress ran out of memory mid-update
  • File permission issues — Server can’t delete the .maintenance file automatically
  • Browser closed prematurely — You closed the browser window during an update
  • Plugin/theme conflict — Code errors preventing the update from completing
  • Server crash — Hosting server went down during the update process

Solution 1: Delete the .maintenance File (Quick Fix)

This is the fastest solution and works 95% of the time.

Via FTP:

  1. Connect to your site using an FTP client (FileZilla, Cyberduck, etc.)
  2. Navigate to your WordPress root directory (usually public_html or www)
  3. Look for a file named .maintenance
  4. Delete this file
  5. Refresh your website

Via cPanel File Manager:

  1. Log in to cPanel
  2. Open File Manager
  3. Go to your WordPress root directory
  4. Click “Settings” and enable “Show Hidden Files”
  5. Find and delete .maintenance
  6. Clear your browser cache and reload

That’s it. Your site should be back instantly. The file is tiny (usually just a few bytes) and only contains a timestamp—deleting it is completely safe.


Solution 2: Delete via SSH (Fastest Method)

If you have SSH access, this is the quickest way:

cd /home/username/public_html
rm -f .maintenance

Replace /home/username/public_html with your actual WordPress installation path. The -f flag forces deletion without prompting for confirmation.

You can also check if the file exists first:

ls -la | grep maintenance

If it shows .maintenance, delete it with the rm command above.


Solution 3: Delete via WordPress Dashboard (If Accessible)

Sometimes you can still access wp-admin even when the front-end is stuck.

  1. Try logging in to yoursite.com/wp-admin
  2. If you get in, go to Plugins or Themes
  3. Complete or cancel any pending updates
  4. The .maintenance file should auto-delete

If wp-admin is also showing the maintenance message, use FTP or SSH instead.


Solution 4: Wait and Retry (For Active Updates)

If you interrupted an update that’s actually still processing:

  1. Wait 10–15 minutes
  2. Don’t refresh or close the browser
  3. Let WordPress complete the background process

Sometimes the update is legitimately running but appears stuck. However, if nothing changes after 15 minutes, proceed with deleting the .maintenance file—the update has genuinely failed.


Solution 5: Check File Permissions

If you delete .maintenance but it reappears or your site stays in maintenance mode:

  1. Check folder permissions on your WordPress root directory
  2. Set to 755 for folders
  3. Set to 644 for files

Via FTP:

  • Right-click the folder → File Permissions
  • Enter 755 for directories
  • Enter 644 for files

Via SSH:

cd /home/username/public_html
chmod 755 .
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;

This ensures WordPress can properly create and delete maintenance files during future updates.


Solution 6: Manually Complete the Failed Update

If the update failed halfway:

  1. Delete the .maintenance file first
  2. Download the latest version of whatever you were updating (plugin/theme/WordPress) from the official source
  3. Upload it manually via FTP to replace the incomplete files
  4. Test your site

For WordPress core updates:

  1. Download from wordpress.org
  2. Extract the files
  3. Delete the wp-content folder from extracted files
  4. Upload everything else to your server (overwrite when prompted)

Solution 7: Clear All Caches

After removing the .maintenance file, cached versions might still show the error.

Browser cache:

  • Press Ctrl+Shift+Delete (Windows) or Cmd+Shift+Delete (Mac)
  • Select “Cached images and files”
  • Clear data

WordPress cache plugins:

  • WP Super Cache: Settings → Delete Cache
  • W3 Total Cache: Performance → Purge All Caches
  • WP Rocket: Clear Cache button in toolbar

Server cache:

  • Contact hosting support to clear server-level cache
  • Or check cPanel for “Cache Manager” options

Try accessing your site in an incognito/private window to bypass local caching.


Solution 8: Check for Plugin Conflicts

If maintenance mode persists even after deleting .maintenance:

  1. Rename /wp-content/plugins/ to /wp-content/plugins-disabled/
  2. Test your site
  3. If it works, rename it back
  4. Disable plugins one by one to find the culprit

A broken plugin might be forcing maintenance mode through code rather than the .maintenance file.


Solution 9: Restore from Backup

If nothing works and you have a recent backup:

  1. Access your hosting backup system (most hosts keep automatic backups)
  2. Restore to a point before the update started
  3. After restoration, update plugins/themes one at a time to avoid repeating the issue

Contact your hosting provider if you’re unsure how to access backups. They can usually restore for you within minutes.


How to Prevent This in the Future

  • Always backup before updates — Use plugins like UpdraftPlus or your host’s backup system
  • Update one thing at a time — Don’t bulk-update 10 plugins simultaneously
  • Check server resources — Ensure adequate PHP memory and execution time limits
  • Use a staging site — Test updates on a clone before applying to your live site
  • Keep your internet stable — Don’t start updates on unreliable connections
  • Schedule updates during low-traffic times — Reduces risk if something goes wrong

Tip from experience: I always keep FileZilla open in the background whenever I’m updating WordPress. If something goes wrong, I can delete .maintenance in 5 seconds instead of panicking and troubleshooting for 20 minutes.

Related: After fixing maintenance mode issues, make sure everything else is working correctly by checking for other common errors like How to Fix WordPress 500 Internal Server Error.


Conclusion

Getting stuck in WordPress maintenance mode is usually a simple fix—just delete the .maintenance file. The whole process takes less than a minute if you have FTP access ready. The key lesson here is that WordPress creates this file intentionally but sometimes fails to clean up after itself. Knowing this makes the problem far less intimidating than it first appears.

Leave a Comment