How to Enable & Disable Maintenance Mode in Magento
Why Do We Need Maintenance Mode?
The reason why you need to set your Magento online store in maintenance mode is to inform your visitors that you're currently working on your website until it's ready to resume its operation.
Once your store is ready, then you can disable the maintenance mode.
Here's how you can enable and disable maintenance mode:
To put a Magento site in maintenance mode, you need to create an empty .maintenance.flag file and upload it to the /var folder of your site.
Here's an example on how we create .maintenance.flag file and insert it into /var folder via File Manager.
Make sure not to miss the dot in front of the filename.
Enter your Magento store full website address on your browser and your web site will look like this:
NOTE: Both front end and admin dashboard cannot be accessed when using this method
To exclude all user access EXCEPT the administrator, you need to create a file called .maintenance.ip and insert the ip address belonging to the administrator. By doing so, only the administrator can view and edit the website. Make sure to upload it into the same /var folder.
In other words, only visitor visited from that same IP address, the website will not show the maintenance page.
NOTE: If you cannot locate both .maintenance.ip and .maintenance.flag files using File Manager, use Filezilla instead
Once you have performed the necessary updates and decided it's time to disable maintenance mode, you can just remove both the .maintenance.flag and .maintenance.ip files using FileZilla.
Updated on: 18/04/2019