我使用plug-in 用于维护模式,并始终将其保持在“维护”模式。
实际上,您可以通过打开/关闭该插件来打开/关闭实际维护模式-通过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