pivvenit / wordpress-readonly
WordPress plugin that activates readonly mode
Package info
github.com/pivvenit/wordpress-readonly
Type:wordpress-plugin
pkg:composer/pivvenit/wordpress-readonly
2.1.1
2026-02-10 19:11 UTC
Requires
- php: >=8.2
- ext-json: *
- wp-cli/wp-cli-bundle: *
Requires (Dev)
- php-parallel-lint/php-parallel-lint: ^1.2.0
- php-stubs/wp-cli-stubs: ^2.4
- phpunit/phpunit: ^10.0
- squizlabs/php_codesniffer: ^3.4
- szepeviktor/phpstan-wordpress: ^1.3.0
- yoast/phpunit-polyfills: ^2.0
This package is auto-updated.
Last update: 2026-06-15 07:04:23 UTC
README
A WordPress plugin that makes WordPress readonly. It's main use case is blue/green deployments, in which the active application slot requires a (short) readonly window to sync the database to the other slot.
Features:
WP-CLIcommands to enable and disable the readonly mode- Notify logged-in users (in the admin) of upcoming
readonlyphase using notification. - Disable login for all users during both
prepareandreadonlyphase. - Drop all
POSTrequests duringreadonlyphase with a503 Service Unavailable. - Refreshes admin pages for logged-in users once readonly mode is disabled.
Installation
This plugin is designed for WordPress websites that use Composer, such as Bedrock.
composer require pivvenit/wordpress-readonly
Usage
Enable readonly mode
./vendor/bin/wp readonly enable
Disable readonly mode
./vendor/bin/wp readonly disable