To put a Magento site in maintenance mode, you need to create empty maintenance. flag file and upload it to the root folder of your website. Once you enable the maintenance mode, even if logged as admin, you won’t be able to access the front end of the website. You also need to modify the index.php file in the Magento root folder to grant access to certain IP addresses that can load the site.