How To Enable Or Disable Maintenance Mode In Magento 2
In this post, I will guide you on How To Enable Or Disable Maintenance Mode In Magento 2. Use maintenance mode to upgrade or reconfigure your site.

Steps To Enable Or Disable Maintenance Mode In Magento 2
1. First, you need to connect to your server via SSH as the root user by command:
ssh root@<your-ip-address> -p <your-port-number>
2. Go to Magento 2 root folder.
Enable The Maintenance Mode
Use the Magento 2 CLI command to enable maintenance mode.
php bin/magento maintenance:enable [--ip=<ip address> ... --ip=<ip address>]
--ip=<ip address>
is an IP address exempt from maintenance mode (for example, developers doing the maintenance).
For example, to exempt more than one IP address in the same command:
php bin/magento maintenance:enable --ip=127.0.0.1 --ip=127.0.0.2
We enable maintenance mode for all clients except 127.0.0.1 and 127.0.0.2
To enable maintenance mode with no IP address exemptions, run below command:
php bin/magento maintenance:enable
Disable The Maintenance Mode
Use the Magento 2 CLI command to disable maintenance mode.
php bin/magento maintenance:disable [--ip=<ip address> ... --ip=<ip address>]
Similar to enabling the maintenance mode, you can add exempt IP addresses.
To disable maintenance mode with no IP address exemptions, run below command:
php bin/magento maintenance:disable
Show Maintenance Status
To know the current status of the maintenance mode, run below the command:
php bin/magento maintenance:status
This is the end of the post.
Follow us for the more helpful posts!
We hope this is a useful post for you on How To Change Database Name In Magento 2.
Thank you for reading!