Shopping cart

Magento 2 Enable maintenance mode via Command Line

In this tutorial, we will talk about Enable maintenance mode via Command Line in Command Line Series. As you know, from Magento 2, they add many commands in bin/magento. This may difficult to get approach this , let me explain more detail about it.

Enable maintenance mode via command line

php bin/magento maintenance:enable

Result:

$ php bin/magento maintenance:enable
Enabled maintenance mode

Disable maintenance mode

php bin/magento maintenance:disable

Allow IPs to access to the store

Sets maintenance mode exempt IPs

php bin/magento maintenance:allow-ips

E.g:

php bin/magento maintenance:allow-ips 168.168.168.168
Set exempt IP-addresses: 168.168.168.168




Enjoyed the tutorial? Spread it to your friends!

magento-2-module-development
command
line
cli
console
indexer
reindex

Comments for Magento 2 Enable maintenance mode via Command Line

Please leave comments if you have any questions, feedbacks.

Module Development

We recommend:

You also may like these Magento 2 Extensions

One Step Checkout

$199
111 reviews

Layered Navigation

$99
59 reviews

Gift Card

$199
6 reviews

Reward Points

$99
4 reviews

Affiliate

$149
12 reviews

Shop By Brand

$99
16 reviews