admin管理员组文章数量:1430077
During theme or plugin upgrades, maintenance mode is enabled and then disabled once complete.
Is it possible to manually enable / disable maintenance mode?
Enabling Maintenance mode...
Downloading update from xxxx
Disabling Maintenance mode...
During theme or plugin upgrades, maintenance mode is enabled and then disabled once complete.
Is it possible to manually enable / disable maintenance mode?
Enabling Maintenance mode...
Downloading update from xxxx
Disabling Maintenance mode...
3 Answers
Reset to default 7WP-CLI now has native commands for it.
# Activate Maintenance mode
$ wp maintenance-mode activate
# Deactivate Maintenance mode
$ wp maintenance-mode deactivate
See wp-cli/maintenance-mode-command
for more information.
You can enable maintenance mode in WordPress by adding a .maintenance
file to your root WordPress directory. It will need to include:
<?php
$upgrading = time();
With this file in place, your site will be in maintenance mode until you remove the file.
I use a plug-in for maintenance mode and always leave it "in" maintenance mode.
Practically you can then turn on/off the actual maintenance mode by turning on/off that plugi-in — which is easy through wp-cli:
# activate maintenance mode, flush caches and stuff
wp plugin activate ultimate-maintenance-mode
# do maintenance things
wp plugin deactivate ultimate-maintenance-mode
# flush caches again so the maintenance page does not show up
本文标签: wp cliwpcli Enabling Maintainance Mode
版权声明:本文标题:wp cli - wp-cli Enabling Maintainance Mode 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745552086a2662987.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论