WordPress stuck in maintenance mode: how to fix safely
When updating WordPress core, themes, or plugins, you might encounter the dreaded message: “Briefly unavailable for scheduled maintenance. Check back in a minute.” Sometimes, this message never goes away, leaving your site stuck in maintenance mode. The quick fix is to safely delete the .maintenance
file from your WordPress root directory. This article explains why this happens and provides a step-by-step guide to resolve it without risking your site.
Quick Fix: Delete the .maintenance
file
- Access your WordPress site files via FTP, SFTP, or SSH.
- Navigate to the root directory of your WordPress installation (where
wp-config.php
lives). - Locate the file named
.maintenance
. - Delete the
.maintenance
file. - Reload your website in the browser; it should now load normally.
Why this happens
WordPress automatically creates a hidden file named .maintenance
in the root directory when you start an update process. This file triggers the maintenance mode message to visitors. Normally, WordPress deletes this file once the update completes successfully.
However, if the update process is interrupted — due to server timeout, plugin conflicts, or manual termination — the .maintenance
file remains, causing your site to stay in maintenance mode indefinitely.
Because the file is hidden (due to the leading dot), it’s easy to overlook, especially if you’re browsing files with a default file manager that doesn’t show hidden files.
Step-by-step guide to fix and rollback
- Backup your site
Before making any changes, create a full backup of your WordPress files and database. This ensures you can restore your site if anything goes wrong. - Access your site files
Use an FTP client (like FileZilla), your hosting control panel’s file manager, or SSH to connect to your server. - Locate and delete the
.maintenance
file
Navigate to the root WordPress directory. Make sure hidden files are visible. Find and delete the.maintenance
file. - Check your site
Refresh your website in a browser. It should load normally without the maintenance message. - Verify updates
Login to your WordPress admin dashboard and check if the updates completed successfully. If some updates failed, try updating those plugins/themes again. - Rollback if necessary
If the update caused issues, use your backup to restore the previous working state. Alternatively, use a plugin like WP Rollback to revert individual plugins or themes.
Deleting .maintenance
via SSH
cd /path/to/your/wordpress/root
rm .maintenance
Deleting .maintenance
via FTP
- Connect with your FTP client.
- Enable viewing hidden files (usually a setting like “Show hidden files”).
- Navigate to the WordPress root folder.
- Right-click the
.maintenance
file and delete it.
Works on
Environment | Notes |
---|---|
Apache | Standard WordPress hosting; file access via FTP/SSH works the same. |
Nginx | Same fix applies; no difference in maintenance file handling. |
LiteSpeed | Compatible; maintenance file method is identical. |
cPanel | Use File Manager or FTP to delete .maintenance . |
Plesk | Use File Manager or SSH to remove the file. |
FAQ
- Q: What if I don’t see the
.maintenance
file? - A: Ensure your FTP client or file manager shows hidden files. The file starts with a dot and is hidden by default.
- Q: Can I just wait for WordPress to exit maintenance mode?
- A: Normally yes, but if the update was interrupted, WordPress won’t remove the file automatically, so manual deletion is required.
- Q: Is it safe to delete the
.maintenance
file? - A: Yes, deleting this file only disables maintenance mode. It does not affect your site’s data or files.
- Q: How can I prevent this from happening again?
- A: Avoid interrupting updates, ensure your server timeout settings are sufficient, and update plugins/themes one at a time if possible.
- Q: My site is still broken after deleting
.maintenance
. What now? - Check for incomplete updates or plugin/theme conflicts. Restore from backup if necessary and try updating components individually.