How to show and customize Magento maintenance mode page


When you maintain your Magento store, your store will be normally not accessible, you want to notice visitors that your website is being maintained. How can we do this?

In this tutorial for beginners, we will find out how to put a Magento store to maintenance mode and how to customize Maintenace Page so that it can keep visitors coming back to your website and not feeling annoying.

Put your Magento store to maintenance mode

It’s simple to put your Magento store to maintenance mode, use your file manager to upload an empty file named: maintenance.flag and upload it to Magento root folder. I will be like this

maintenance flag file

After uploading, go to your website to see the maintenance mode enabled like this

Allow access exception for maintenance mode

After enabling Maintenance mode, you will not be able to access frontend store, even you already logged in as Admin. We need to add an exception for your IP address so that you can still access your Magento store as normal.

To allow and IP to access store during maintenance, open index.php in Magento root folder, go to line 47 and add the following code:

whereas x.x.x.x, y.y.y.y are IPs that are allowed to access store during maintenance mode.

To find out your own IP, visit

Now try to access store with Maintenance.flag enabled to see the result.

Quick tip: Do you know that Maintenance.flag is 1 of the reason that causes Magento Error 503 Service Temporarily Unavailable

Customize maintenance page

By default the maintenance mode page looks like this:

magento maintenance mode page

Now we will customize this default page so that it will has better looking and provide more information

To edit maintenance mode page, go to /errors/default/503.phtml, edit file and enter the following code

Next, we will need to remove the wrapper so that the page will display independently, go to /errors/default/page.phtml, edit this file and remove everything inside, then put the following code

Now save the file, flush Magento cache and you will have a page like this.
maintenance page customized


You can use your html/css knowledge to create more beautiful maintenance pages for Magento, like these example

Example 1

maintenance page example 1

Example 2

example 3

Example 3:example 2


Today, every single page on your e-commerce store is important as they can drive sales with a good optimization. I hope you guys can make the most out of Magento maintenance mode page after reading this Magento tutorial.

Drop a line here if you have any question or suggestion.

How to show and customize Magento maintenance mode page
5 (100%) 2 votes


About Author

Daniel is a Magento developer with 5 years of experience with customizing Magento extensions, Magento templates. He's main author at Magento explorer


  1. followed this exactly as written and it all works except that even after entering my IP i still get the maintenance page and not my site

    help please!

Leave A Reply