Need help buying now? +358 9-424-505-31 +1 888-886-76-81
My Cart

Your Cart is Empty

Need help buying now?
+358 9-424-505-31 +1 888-886-76-81

Magento Maintenance Mode: How & Why Store Transitions Use It

Maintenance mode for Magento system

Working with the site engine is quite a difficult task which requires attention and responsibility. Let us review how to configure maintenance mode option for Magento ® system.

What to do if you need to close the site

Let’s suggest your store is unavailable due to some external reasons (e.g. hosting server issues or some of the extensions for Magento ® do not work properly). In this situation it is logical to close the store until the problem is fixed, otherwise, you may lose many customers including your permanent ones.

What is NOT recommended when you temporarily close the site:

1. Close access to the site and do not display any information as to the reasons and terms of the site being unavailable. Put yourself in your customer’s shoes – they have just ordered a product and suddenly the site is closed. They will hardly come to your store again.

2. Blame someone else (e.g. your hosting company). They may be guilty, of course, but you should simply explain to your visitors that the site is unavailable due to external reasons which are not under your control and everything possible is being done to fix the problem in the shortest time.

3. Do not specify any approximate time of maintenance period ends. If you need to edit your online store you may ask our development team for Magento ® to help you calculate the necessary time.

The configuration of the maintenance mode

The online store administrators often need to configure the front-end interface to inform their visitors about the technical work in progress. This is called ‘maintenance mode’ in Magento ® system. A step-by-step instruction to enable it is below:

1. In order to put your site into maintenance mode create a new empty file called ‘maintenance.flag’ and upload it to the server;

2. You must understand that when maintenance mode is enabled even the administrator will not have access to the admin panel. If you wish to allow the administrator to be able to access the admin panel and make some configurations you need to edit the file index.php. Open it using an editor, or download it to your computer and then open with the help of Notepad. You need to replace line 47 with the following code:

$allowed = array('','');



In the line $allowed = array(‘′,’′); you will need to specify to which IP addresses the store will be available (here you need to specify your administrator’s IP, webmaster’s IP and your own).

3. After that locate this part of code:

if (file_exists($maintenanceFile)) {



and replace it with:

if (file_exists($maintenanceFile) && !in_array($ip, $allowed)) {



4. Save the changes and refresh the store page. If the site is available to you then you have done everything correct, if not – you should check the correctness of the data you have added to index.php.

You can use any other text other than the default ‘The site is under construction’, etc. Just go to the file errors/default/503.phtml and change the text. Do not forget to save all changes you make. Try to address your visitors not too officially but without excessive familiarity.

If there are orders that have not been processed make sure you inform your customers that you are working on the problem and they will soon receive the products they have ordered or will be issued a refund. Some marketing specialists even advise using infographics or just an appropriate image with the explanation of the situation.

If you have any questions please feel free to contact us by leaving a comment on the article or directly by email.