How to enable magento store on maintenance mode


To Enable maintenance mode for magento 1.6 or less

• From the Admin Panel, select System > Configuration
• Select the Maintenance Mode tab in the left side panel in the General section.
• Expand the Maintenance Mode Options bar.
• Set Enable Maintenance Mode to Yes.
• From the Maintenance Mode Page drop-down menu, select 503 Service Unavailable.
• In the Whitelist field, enter the IP addresses that you want to exempt from being redirected to the maintenance mode splash page, if you would like to view your store, while working on it. Your IP address is shown below – simply fill it into the Whitelist.
• Once you’ve configured it, click [ Save Config ] to save these changes.
To Enable maintenance mode for magento 1.7

To enable your magento 1.7 store for maintenance mode just you need to create a new file on your root folder named “maintenance.flag” .
If you still want to use your site from specific ip address then just need to make few changes on index.php file and create an array on which ip address you want to access the site. By writing the code below here ‘ is your ip address

$allowed = array(‘’,’’);

then change the line
if (file_exists($maintenanceFile)) {
if (file_exists($maintenanceFile) && !in_array($ip, $allowed)) {
Now you will see site is accessible from your ip address and others are seeing as on maintenance mode.

Related posts:

The following two tabs change content below.

Chandra Shekhar

Consultant at Infogain
Chandra Shekhar is a LAMP Developer,Thinker,Blogger and currently working as Magento(Ecommerce) specialist.. I am always open to learn new things in LAMP as well as other newer technology. In the journey of my last 9 years of web and product development, I have decided to share my knowledge and experience to Open Source Community in 2011. In this regard I have started Since then I am actively sharing my knowledge on various LAMP technology through’s technical ... Read More about Chandra Shekhar