| 开发者 | pavelsilinskii |
|---|---|
| 更新时间 | 2026年11月6日 00:36 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp psmm on --for=15m
# git pull, composer install, wp core update-db ...
wp psmm off
If the deploy script fails halfway, the site comes back by itself when the timeout ends — no more sites left in maintenance overnight.
Why not core wp maintenance-mode? Core's mode locks out everyone, administrators included, shows a plain "Briefly unavailable" message, and has a fixed 10-minute window. This plugin:
wp psmm on [--for=<duration>] — enable, optionally with an automatic timeoutwp psmm off — disablewp psmm status [--format=table|json|yaml] — state, end time and bypass linkwp psmm is-active — exit code 0 when active, 1 otherwise, for use in scriptswp psmm on --for=15m from your deploy script.wp psmm off?With --for, maintenance mode turns off by itself when the timeout ends. Without it, the mode stays on until you turn it off.
No. The page is served with HTTP status 503 and a Retry-After header, which tells search engines the outage is temporary and when to come back.
Administrators always see the live site. Use the "Preview maintenance page" button or open the site in a private window.
A page cache (plugin, server or CDN) may be serving cached pages. Purge the cache after enabling maintenance mode.
Copy the secret bypass link from the Access section, or run wp psmm status. Clear the key and save to revoke all shared links.
Yes. Copy templates/maintenance.php to your theme as psmm-maintenance.php, or use the psmm_template filter.