Before enabling Maintenance mode on your Magento CMS you need to check your IP address in Google by searching “my IP address” in your browser. Once you get your IP address simply copy it.

Step::1 Login to your cPanel and go to File Manager section

Step::2 Now go inside the root directory i.e public_html and find the Magento installation directory

Step::3 Find the “var” directory and create a new file inside it

Step::4 Name the file as “.maintenance.flag

Step::5 Once the file is created, right click over the file and choose the Edit option

Step::6 In the editor section, add the code given below-

magento maintenance:enable-ip=163.112.98.13

[Note: Make sure you replace the ip with your actual <ip address>]

Step::7 Once you have added the above code click on Save Changes button and close the editor.

This code will enable maintenance mode in Magento.

If you want to disable the maintenance mode you can simply replace the “enable” keyword with “disable” in the code.

Congratulations, you have successfully enabled Maintenance mode in Magento !!!


Visit our Blog for more details. You can also watch the video here.
Was this answer helpful? 0 Users Found This Useful (0 Votes)