pivvenit / wordpress-readonly
WordPress plugin that activates readonly mode
Installs: 12 246
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 3
Forks: 0
Open Issues: 12
Type:wordpress-plugin
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
- squizlabs/php_codesniffer: ^3.4
- szepeviktor/phpstan-wordpress: ^1.3.0
- dev-master
- 2.0.13
- 2.0.12
- 2.0.11
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.0
- dev-dependabot/composer/mustache/mustache-2.14.1
- dev-dependabot/composer/szepeviktor/phpstan-wordpress-0.7.7
- dev-dependabot/composer/rmccue/requests-1.8.1
- dev-dependabot/composer/wp-cli/wp-cli-2.5.0
- dev-dependabot/composer/php-stubs/wp-cli-stubs-2.5.0
- dev-dependabot/composer/wp-cli/wp-cli-bundle-2.5.0
- dev-dependabot/add-v2-config-file
- dev-dependabot/composer/composer/composer-1.10.22
- dev-dependabot/composer/squizlabs/php_codesniffer-3.6.0
- dev-dependabot/composer/php-parallel-lint/php-parallel-lint-1.3.0
This package is auto-updated.
Last update: 2024-10-16 15:11:07 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-CLI
commands to enable and disable the readonly mode- Notify logged-in users (in the admin) of upcoming
readonly
phase using notification. - Disable login for all users during both
prepare
andreadonly
phase. - Drop all
POST
requests duringreadonly
phase 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