What to Do When WordPress Gets Stuck In Maintenance Mode

As I was working with WordPress today, I happened to stumble into a webmaster’s horror scenario. It all started when I noticed that some of my plugins were out of date. In an effort to correct this, I selected all outdated plugins, and then clicked the handy little “Update plugins” button. Instead of seeing the progress messages, I was greeted by this:

Internal Server Error (HTTP 500) seen within WordPress' Update Plugins page.

Uh-oh.

It was the timing of the Internal Server error that made me uneasy – did the upgrade process have time to complete? Any interruption could potentially result in database corruption, so I launched another window and tried to see if everything was working normally. Here’s what I saw:

Briefly unavailable for schedule maintenance. Check back in a minute.

Yep, definitely interrupted.

Even after a few refreshes, that message remained – which meant that WordPress switched to maintenance mode for the upgrade progress, but since it was interrupted by the crash, it never had the opportunity to disable it. In an attempt to assist, I tried to access the admin interface, only to get the same message. Seeing as I had a minor WordPress apocalypse to deal with, I wondered how I was supposed to repair it.

Solution

FTP client showing the .maintenance file in the main WordPress directory

The culprit

Thankfully, a quick web search pointed me to an article where someone encountered and resolved the same issue (emphasis added):

I noticed a strange file in the root of the site called .maintenance. The date stamp was just minutes old, so I deleted it and VOILA, the site was back to normal.

So, if you are unable to load WordPress because it’s stuck in Maintenance mode, just FTP into the root directory and delete the .maintenance file.

Good catch, John, and thanks for ending my miniature webmaster crisis.

I’m hoping that the guys at WordPress find a better way to handle cases like these, as the current approach seems somewhat dated. If they were informing administrators before every update, then there wouldn’t be problem. As it stands, victims will either have to search for a solution online, or do some investigating – both of which increase downtime. Please, WordPress… help us keep these horror scenes short.

See Also

Tutorial: Manually Take WordPress Out of Maintenance Mode

  • Art Beaker

    Thank you! Saved me from a heart attack.

  • disqus_hFFlK4OHNc

    Cheers!

  • Thanks! This came in handy today for sure.

  • Great.. but i have the same mensage and dont find the file .maintenance

    • I was finally able to fix my problem by going into WP Super Cache settings and selecting “Cache Off” then selecting “Update Status”. After confirming it worked, I went back and selected “Cache On”

      • NicoleJButler

        Thanks, LauraJean – this just worked perfectly for me!

  • Totally worked like a charm!!!

  • Thanks for the tip. Good to know.

  • Thank you. Simple and helpful.

  • Pingback: Blue Liquid Designs on "[Plugin: Gravity PDF] update plugin" * Best Wordpress Themes - Reviews()

  • Thank you!! This is the fix I’ve been looking for for ages, it doesn’t happen very often, but previousl I was having to delete the plug in that was stuck and reinstall it, fine if it’s out of the box, but any modifications or data in it, not a great solution. Cheers! Amy

  • Pingback: How to get the site back up again when it goes down | Easy Web Design Tutorials()

  • VCS Consulting LLC

    Thanks so much for the great info! Glad you posted this. Saved me!

  • Mat

    Excellent! – Thanks for this… Minor Heart Attack, Resolved!

  • A common situation is when WP remains stuck in maintenance mode when starting to do updates but leaving that page (close/back/refresh).

    Would be great to have a web based method of getting out of maintenance mode, with admin details, without FTP details to remove “.maintenance” file.

    Sometimes our staff update plugins for our clients and only have admin details. If issue occurs, this generates inconvenience and downtime until client removes file or provides ftp details.