| 开发者 | aryanjasala |
|---|---|
| 更新时间 | 2026年11月12日 05:29 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
axle_read_only_mode_checks filter. wp axle-read-only-mode check and the check-freeze ability give the same answer to scripts and AI agents.
Freeze part of the site
A freeze has a scope:
--scope=content or --scope=code). Anything the plugin cannot recognise as settings or code counts as content, and the axle_read_only_mode_request_area filter fixes a screen it sorts wrongly.
See what was blocked
Every blocked attempt is listed: who tried, when, and what (a post save, an upload, a REST request, a contact form). After the move you know exactly which edits to redo on the new server. The last ten freezes are kept too, with how many attempts each one blocked.
Freeze safely
/wc/v3/webhooks./checkout/order-pay or ?wc-api=.--network, --sites and the global --url.
Email when a freeze starts or ends
Off by default. Choose who gets it (the admin email if you leave it empty) and when: a freeze starts, someone ends it, it ends by itself at its end time, it is extended, or a scheduled freeze starts. The email says who, why and until when, and for an end, how many attempts were blocked with a link to the list. It uses wp_mail(), and the same event never sends more than one email a minute.
Site Health
Tools > Site Health has a read-only mode test. It is good when the site is not frozen, recommended while a freeze with an end time is running, and critical when a freeze ran 30 minutes past its end time, a freeze with no end time has lasted more than 6 hours, or wp-config.php forces the freeze. The Info tab lists the state, end time, allow-list counts and email settings.
From a deploy script
wp axle-read-only-mode on --minutes=30 --reason="Moving servers"
wp axle-read-only-mode off
wp axle-read-only-mode status
wp axle-read-only-mode extend 30
wp axle-read-only-mode log
wp axle-read-only-mode on --network (a whole multisite network)
wp axle-read-only-mode allow rest /wc/v3/webhooks
wp axle-read-only-mode notify --enable
wp axle-read-only-mode health
WP-CLI itself is never blocked, so your scripts can keep importing and replacing data. Use --no-visitors or --no-cron to leave those running.
Or freeze from wp-config.php while files are being swapped:
define( 'AXLE_READ_ONLY_MODE', true );
define( 'AXLE_READ_ONLY_MODE_REASON', 'Moving servers' );
Try it before you install. try.axlewp.com/axle-read-only-mode opens a private WordPress in your browser with this plugin and some demo content.
Maintenance mode shows visitors a placeholder page instead of the site. Axle Read-Only Mode keeps the site fully visible and only stops changes. Use it when the site has to stay online during the move.
It stops every form that posts to the site from the front end, every REST API write and every admin-ajax request that is not on the read-only list. A form that sends data straight to an outside service is not affected.
Admin-ajax requests are blocked unless they are known to be read-only. Add the action name under Tools > Read-Only Mode > Settings, or with the axle_read_only_mode_allowed_ajax_actions filter.
Add its REST route, its path or its query argument (such as ?wc-api=) on the Settings tab. Payment providers such as Stripe and PayPal retry a webhook that gets a "back soon" answer, so orders paid during a freeze usually arrive once it ends. Let a webhook through only if its provider does not retry.
Yes. Tick "Let me keep editing" when you freeze, add the person under "Users who may keep editing" on the Settings tab, or use the axle_read_only_mode_user_can_bypass filter.
No. A network freeze overrides the site. Only a network admin can end it, from Network Admin or with wp axle-read-only-mode off --network. The site's own freeze is separate: the site is frozen while either one is running.
No. The plugin enforces the freeze, so it has to be active on the site. Network-activate it so every site is covered.
Options, plugins, themes, widgets, templates, user accounts and updates keep working, and update checks keep running. Everything else is treated as content, including a plugin's own screens and forms the plugin does not recognise as settings. Visitor comments, forms and checkouts are content, so they pause too. Sign-ups pause with them.
No. Editors, commenters and customers keep working. The "Before you freeze" card says so ("Not affected") when you pick that scope.
No. It only tells you what would be interrupted. If other people have a post open, the freeze button asks first and says how many.
Only if you turn it on, under Tools > Read-Only Mode > Settings. It uses wp_mail() and sends at most one email per event per minute.
wp axle-read-only-mode extend and wp axle-read-only-mode log.