Warning: Cannot modify header information - headers already sent by (output started at /www/wwwroot/sbboke.com/wp-content/plugins/wordpress-seo/src/integrations/front-end-integration.php:409) in /www/wwwroot/sbboke.com/wp-content/themes/pacify/content-single.php on line 5

Magento 2通过命令行启用或禁用维护模式

在本教程中,我们将讨论允许通过命令行的Magento 2维护模式,命令行系列。如您所知,在Magento 2中,它们在中添加了许多命令bin/magento。这可能很难解决,让我解释一下它的更多细节。

在Magento 2中检查维护模式状态

 php bin/magento maintenance:status

结果:

Status: maintenance mode is not active
List of exempt IP-addresses: 123.123.123.123

通过命令行启用Magento 2维护模式

php bin/magento maintenance:enable

结果:

$ php bin/magento maintenance:enable
Enabled maintenance mode

通过命令行禁用Magento 2维护模式

php bin/magento maintenance:disable

允许IP访问商店

设置维护模式豁免IP

php bin/magento maintenance:allow-ips

例如:

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

相关文章

0 0 投票数
文章评分
订阅评论
提醒
0 评论
内联反馈
查看所有评论