Fill the form & Get Installation Support

    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 –

    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


        mage Monkeys

        Let’s initiate a discussion!!

        Book a call

        Let our Magento expert connect to discuss your requirement.

          We offer Magento
          certified developers.

          Our Magento clientele
          is 500+.

          We sign NDA for the
          security of your projects.

          We’ve performed 100+
          Magento migration projects.

          Free quotation
          on your project.

          Three months warranty on
          code developed by us.