1. Home
  2. Support
  3. Applications
  4. How to put Magento 2.x into maintenance mode

How to put Magento 2.x into maintenance mode

Putting Magento 2.x into maintenance mode can be done by placing a file named .maintenance.flag in the var folder. (yourdomain.co.uk/var/.maintenance.flag)

This can be done using FTP or File Manager.

When a Magento site is put into maintenance mode even administrators will not be able to see the normal site or log in.

To allow administrators to access the site during maintenance mode you first need to know their IP addresses.

Once you know which IP addresses you would like to allow access to the maintenance mode Magento site, you just need to place the IP’s in a file called .maintenance.ip inside the var folder. (yourdomain.co.uk/var/.maintenance.ip)

When the IP’s are in yourdomain.co.uk/var/.maintenance.ip then anyone who’s IP is in there will not see a maintenance page and will instead see the normal site. Whereas anyone who’s IP is not in this file will see the maintenance page.

Click here for full details

Classification: Public
Last saved: 2021/05/14 at 10:04 by Jamie