B-219 Sec-55 Noida, India

How to enable Maintenance Mode – Magento

There’s two ways, that I know of, to enable Maintenance Mode in Magento.

Since the version 1.4 you can activate the Maintenance Mode by just creating a file called maintenance.flag in your root directory.

Downside: it gets activated for everyone, including you with the admin sesion.

Don’t panic! There’s a workaround, here it is:

1. Open your index.php file in the root folder.

2. Look for this line (should be around the 57th line):
if (file_exists($maintenanceFile)) {

3. Replace it with this one:
if (file_exists($maintenanceFile) && !in_array($ip, $allowed)) {

4. Paste the following code above the line you just changed:

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

5. Change the IP with your own in the $allowed array you just pasted.

What more?

You can edit the 503 page by just going to: /errors/default/503.php

(Visited 61 times, 1 visits today)

Leave a reply

You must be logged in to post a comment.