Blossom your business with savings! From 5th to 12th March, use the promo code SPRING24M and get a 10% discount on any module
Shop Now

Magento 2 Maintenance Mode - Enable/Disable/Status

Magento 2 provide simple CLI (Command Line Interface) for manage maintenance mode.

Enable maintenance mode:

bin/magento maintenance:enable

Disable maintenance mode:

bin/magento maintenance:disable

Allow access only for specified IPs:

bin/magento maintenance:allow-ips,

Check maintenance mode status:

bin/magento maintenance:status

When you enable maintenance mode, magento creates file [magento_home_directory]/var/.maintenance.flag. For disable maintenance mode, you can just remove this file.