Home / Meganto / How to Enable Magento in Maintenance Mode

How to Enable Magento in Maintenance Mode


How to put Magento in Maintenance Mode

Hello Friend’s, Today we going to learn how to enable or put your Magento online store in maintenance mode so your visitors know that you’re updating or working on your website.

Let’s Start

To put a Magento site in maintenance mode, you need to create an empty maintenance.flag file and upload it to the root folder of your site. After that your web site will look like this:


Kindly Note, that once you enable the maintenance mode, even if logged as admin, you won’t be able to access the front end of the site. You will need to modify the index.php file in the Magento root folder to grant access to certain IP addresses that can load the site. To do this, open the index.php file and add this code on line 47:

In the $allowed = array(‘′,’′); you should specify list of IPs that will have access to your site.

Next, search for this piece of code:

and replace it with this:

The modified index.php file should look like this:


If you want to display more information than simply a maintenance mode text, you can edit the 503.phtml file located under the Errors/Default folder.

That’s it Thank you watching @thinknowledge.com

[amazon_link asins='B017ID54G6,B00C77U612,B017ID54G6,B00AUYYVZQ,B01LYSSFM7,8126554568,8131791882,1515233146,B01GSODGZC,1534954546' template='ProductCarousel' store='thinknowledge-21' marketplace='IN' link_id='c8bd129a-4dd0-11e7-80e2-3bd285adad9e']
  • Facebook
  • Twitter
  • Google+
  • Linkedin

Leave a Comment

Your email address will not be published. Required fields are marked *