Web Analytics

Fill the form & Get Installation Support

How to Enable/Disable Maintenance Mode in Magento 2?

In this post, we will discuss how can one enable Maintenance Mode in Magento 2.

It’s a good practice to set Maintenance mode while you are making changes on live site.

In order to put your Magento 2 site in maintenance mode, you need to create an empty .maintenance.flag file and upload it in var folder at the root of Magento Source.

If var/.maintenance.flag does not exist then the website operates normally, and maintenance mode is OFF.

Once you upload .maintenance.flag file to var folder, maintenance mode is on.

You can also verify var/.maintenance.ip file because it contains the list of the IPs that granted access to the website.

Below are some commands that help us to enable/disable maintenance mode:

where –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.

For Ex. : magento maintenance:enable –ip=xxx.xxx.xx.x

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

That’s it. I think it is very simple.

Fill the below form if you have any Magento programming need.





    Recent Articles

    Author Info

    Author Image

    Magento Certified Developer

    Hire V. Brahmbhatt

    Get a Free Quote





      /* second popup */

      Connect With Us