Magento 2 enable disable maintenance mode

Today we discuss about Magento 2 enable disable maintenance mode.Sometime you want to put your website on maintenance mode or some action cause the maintenance mode. Now i will tell you how to enable or disable module and enable maintenance mode with given ip addresses. So let’s start with our example.

Enable maintenance mode

To enable maintenance mode use following command.

bin/magento maintenance:enable

Disable maintenance mode

To disable maintenance mode use following command.

bin/magento maintenance:disable

Enable maintenance mode with ip

To Enable maintenance mode with ip use following command. For example we want To enable maintenance mode for all clients except 192.0.2.10 and 192.0.2.11.

bin/magento maintenance:enable --ip=192.0.2.10 --ip=192.0.2.11

Qaisar Satti

Hi, I'm Qaisar Satti! I've been a developer for over 20 years, and now I love sharing what I've learned through tutorials and guides. Whether you're working with Magento, PrestaShop, or WooCommerce, my goal is to make your development journey a bit easier and more fun. When I'm not coding or writing, you can find me exploring new tech trends and hanging out with the amazing developer community. Thanks for stopping by, and happy coding!

Leave a Reply