Tuesday, July 26, 2011

How to enable maintenance or offline mode 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

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

No comments:

Post a Comment