How to Enable Maintenance Mode in Magento 2

Magewallet | Magento 2 Extensions, Themes & Solutions

How to Enable Maintenance Mode in Magento 2

In this post we will get the knowledge about how to enable Maintenance Mode in Magento 2 store so your visitors know that you’re working on your website. Magento uses maintenance mode while you’re maintaining, upgrading, or reconfiguring your site. In order to put your Magento 2 store in maintenance mode, you need to create an empty .maintenance.flag file and upload it under var folder at root of your Magento installation.

If var/.maintenance.flag does not exist, Magento operates normally, and maintenance mode is off.  Once you upload .maintenance.flag file to var folder, maintenance mode is on. But still you need to verify var/.maintenance.ip file because it contains the list of the IPs that granted access to website.

Lets discuss regarding some commands that helps us to deal with maintenance mode,


–ip= is an IP address to exempt from maintenance mode (for example, developers/ store owner doing the maintenance). To exempt more than one IP address in the same command, use the option multiple times.

magento maintenance:status displays the current status of maintenance mode.

In order to enable maintenance mode without any IP restrictions, we can execute below command,

Lets talk about the case when your client ask for the access front end when your site under maintenance mode, and client’s IP address is and then we can execute below command like,

That’s it. I think it is very simple. But in order to use this method to enable maintenance mode you need to get command line access to your live website. One mistake in executing wrong command will result in Big Loss.

I have found one solution to overcome this situation,

Coming Soon & Maintenance Page Extension for Magento 2

that simple like going to a hotel and order cold coffee. This extension will allow the administration to on or off the Maintenance mode for the Magento 2 website. It comes with additional feature that you can use this extension for display ‘Coming Soon’ Page.

Lets discuss some key features,

  • Truly Responsive
  • Counter
  • IP Whitelist
  • Footer Editor
  • Multi-Store Support
  • Maintain Visitor Log
  • Social Icons
  • Background Slider | Image | Color
  • Analytic Code
  • Progress Bar
  • Custom Logo
  • Custom CSS
  • Custom Redirect

and many more!!

Please share your thoughts about this post through comments and share to help more and more developers and merchants.


1 Comment

Sally Creighton

34 mins ago

extension with good features. will surely use with my next website. thank you!

Leave Comment


Latest Tweets