5

Could someone please advise how to put 1.9.0.1 into Maintenance Mode? Or is this version not supported?? I found some instructions, however I don't have the option for Maintenance Mode for Ver 1.9.0.1 under System>Configuration>General

12

Magento goes to maintenance mode when you create a file named maintenance.flag to your Magento home directory. This is how Magento handles it:

$maintenanceFile = 'maintenance.flag';

if (file_exists($maintenanceFile)) {
    include_once dirname(__FILE__) . '/errors/503.php';
    exit;
}
5

You can create an empty file with name maintenance.flag and just upload to the magento root directory

3

Thats what I add to the index in order to be able to continue working from different IPs:

//EGS to show a maintenance page but be able to work
$ip = $_SERVER['REMOTE_ADDR'];

// these are the IP's that are  allowed to view the site:
$allowed = array('111.111.111.111', '222.222.222.222');

if (file_exists($maintenanceFile) && !in_array($ip, $allowed)) { 
    include_once dirname(__FILE__) . '/errors/503.php';
    exit;
}
1

I followed this tutorial http://magentoexplorer.com/how-to-show-and-customize-magento-maintenance-mode-page to enable maintenance mode page in Magento, you need to create and upload maintenance.flag file to Magento root folder, however there are some more step for a good Maintenance mode like.

Step 1: Add exception during maintenance (allow specific IP to visit your site during maintenance). In index.php, add these lines

$ip = $_SERVER['REMOTE_ADDR']; 
$allowed = array('x.x.x.x','y.y.y.y');

Step 2: Edit maintenance mode page Edit maintenance mode page in /errors/default/503.phtml Remove wrap in /errors/default/page.phtml Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.