Escaping the maintenance mode trap

WordPress makes upgrading very easy . You simply click “Update now”, wait for a minute or two and your system is up to date. If, well if everything works fine.
The most common problem during an upgrade is the Internet connection to drop unexpectedly or the user to shut down the browser unintentionally. In both situations the upgrade will stop instantly.
If you try to log in to your backend again you will receive the message

“Briefly unavailable for scheduled maintenance. Check back in a minute.”

This message is useful to keep users away from your blog during the upgrade but right now it’s keeping you from restarting the upgrade. To solve this problem we have to take a look at how WordPress determines that it’s in maintenance mode.

WordPress is looking for a possible maintenance mode very early to prevent the system dying from any fatal error. So it using a very simple method by writing a file called .maintenance to the WordPress root directory. If the blog or backend is accessed it will check for the file and stop if it’s present.

Knowing this the solution to our problem is quite simple: access your WordPress system via FTP and delete the file .maintenance.

If you’re not able to log in to your server via FTP for some reason there is a second method for escaping from maintenance mode: simply wait 10 minutes!
The file .maintenance contains a timestamp of the time the file was created. If this time is less than 10 minutes ago WordPress will go into maintenance mode otherwise it will continue to work as usual and enable you to restart the upgrade unless something worse keeps it from starting.


Posted

in

by

Comments

18 responses to “Escaping the maintenance mode trap”

  1. Ishaan Bhati Avatar

    Good one ! 🙂

  2. Dilip Kumar Avatar

    Good article for escaping from the maintenance mode trap. but making changes in word press directory cause any damage to the site? Is this method is safe?

  3. Biddut Haque Avatar

    Very Nice Article.

    Thank You.

  4. syed Aly Avatar

    That’s really great Article. I was facing this error now i got right way to do. Thanks a lot

  5. Tauseef Alam Avatar

    Indeed a helpful article, specially for someone who is new to WordPress. Anyone who will see the error “Briefly unavailable for scheduled maintenance. Check back in a minute” first time will get tensed, although the solution is pretty easy.

  6. Michael Kjeldsen Avatar

    Wasn’t aware of the 10 mins quarantine (which makes sense now that I think about it).

    I solved the problem by installing a script on every server I maintain WP on, that I can call via the browser. the script looks for .maintenance and deletes if present (and yes, it is locked behind a login).

    The latest iteration of the scripts sends an email with the option to delete. The script is then cron-job’d.

  7. Jason William Avatar

    Important tips, It will helps many WordPress bloggers.

  8. Gael Avatar

    Oh my god, thanks for that, last time this happened to me (computer crash, damn) I had to rely on my hosting to company to help me (which took 4h+ to get my site back up). Next time this comes up I’m totally giving this a shot before I jump on the support chat.

    Gael

  9. Jordan Avatar

    Wow, awesome tip! I’m sure I’m not the only one who dreads wordpress updates. Always fearing something could go wrong (broken theme, plugins, etc)

  10. bili Avatar

    Thankyou wpengineer team for this helpful tip. I regularly visit your website and always i learn new things which i found nowhere else.

  11. Endre Avatar
    Endre

    Whatup J, And tips on what plugins I should use for wordpress security? Good to see you guys hanging out here:-)

  12. Josh Trenser Avatar

    Hey Folks, thanks a lot for explaining this all!!! I hate it when something goes wrong when updating my wp installation.

  13. Robin Avatar

    OMG!! Thanks alot WPEngineer, I was literally stuck in this trap for hours, this article saved my life, thanks a bunch again :))

  14. onedna Avatar

    WOW now I got the reason and last time due to lack of knowledge I delete my complete blog, But now I got the reason and also came to know the maintenance file can do too many things

    thanks a lot

  15. Christoph Avatar

    good point – I was a bit concerned about the autoupdate functions in the new WP releases. Feel a bit more under control now. Thanks!

  16. Julie Henriksen Avatar

    I hate updating my WP-versions. For some reason I always hold my breath while Worrdpress is doing what it have to do.

    Great post. It is good to know that if something goes wrong, I would most lightly be able to try again in 10 minutes.

  17. James Roberts Avatar

    Is anyone aware of an easy to install WordPress plugin that can be installed on multiple sites to automatically install and update WP?

  18. Michael Kjeldsen Avatar

    Why do you hate it? If you keep your WP-installation and theme regularly updated, I’ve yet to experience an update go bonkers.

    I’ve heard a few people talking about it, but until they actually bring the case to public, I don’t consider their story relevant 🙂