How to get Magento out of maintenance mode

The short version.

  • To get your Magento site out of maintenance mode, login to cpanel on your server and delete the “maintenance.flag” file from root
  • If your site Admin Panel is still not accessible after doing this, you need to clear the var/cache folder

The detail.

When you install, uninstall or upgrade a plugin using Magento Connect Manager, it automatically puts your website into “maintenance mode”  – you can’t access the Admin Panel or the store front during this time.

However, when something goes wrong with a plugin upgrade, install/uninstall, your website will remain in maintenance mode and you have to do some manual server work to restore it.

I recently found a bug in the Magento Connect Manager and in order to get the site out of maintenance mode I had to do the following:

  1. Login to our server cpanel
  2. Go to the root of the site and look for “maintenance.flag”
  3. Delete “maintenance.flag

When you have done this, your Magento store front will be available again.

What do to if you can’t access the Admin Panel after your Magento site has been in “maintenance mode”.

After the bad experience I had with upgrading our eBay plugin using Magento Connect Manager, removing “maintenance.flag” restored the Store front but we were unable to access the Admin Panel.

To access Admin Panel again, I did the following:

  1. Logged into cpanel
  2. Went to the folders “var/cache”
  3. Deleted the content in the “cache” folder

Following this, we were able to successfully access the Admin Panel. Phew.