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):

3. Replace it with this one:

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

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


I wrote a post Magento Offline Maintenance Extension on 2010.

Check out the Maintenance Page – ArtsOn.IT extension.

No comments yet, leave yours!

Leave a Reply

Add <code> Some Code </code> by using this tags.