Home » Magento1 December 2010

Magento: How to enable maintenance mode?

Maintenance mode is a key feature required to any website. You need to set the live website into maintenance mode whenever you need to do any changes in the website. Here, I will show how you can do this in Magento.

For Magento version 1.4 and above,
you just need to create a file named maintenance.flag in your Magento root. Then, your website automatically goes into maintenance mode. To make the site live again, you can just delete the newly created maintenance.flag file.

You can edit maintenance mode template file. It is present in errors/default/503.phtml

For Magento version 1.3 and below,
– create a file called index.html in Magento root and write your maintenance messege in it
– write the following code in the beginning of index.php

<?php
// replace with your development IP
if ($_SERVER['REMOTE_ADDR']!=='1.2.3.4') { 
  header("Location: /index.html");
  exit;
}

Hope this helps. Thanks.

From Mukesh Chapagain's Blog, post Magento: How to enable maintenance mode?

php magento mukesh chapagain

Get New Post by Email

Find me on

Facebook Twitter Google+ LinkedIn RSS Feed
  • http://www.facebook.com/kamilborkowski Kamil Borkowski

    Great stuff!
    Thanks for sharing, will be very usefull!

  • Francesco

    great! how to set multiple IP?