Feature request: support isolated Redis/Valkey databases and ACL users per site
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
調査の方向性
Start with the existing wo site create, wo site info, and --wpredis paths, then inspect how WordPress object-cache settings are generated. Define how database assignment, site-specific ACL users, persistence, and reuse warnings fit together; done means isolated sites receive the selected settings and the assigned database is shown in site information.
索引モデルが issue の本文から書いたものです。
説明
WordOps currently supports Redis object cache, but when running multiple sites on the same server it would be useful to have stronger isolation between sites.
Disclaimers
- Disclaimer 1: I use Valkey on my server.
- Disclaimer 2: I have already used a similar isolation approach for PHP-FPM, with separate pools/users per site, and the same idea would be useful for Redis/Valkey cache isolation.
- Disclaimer 3: I've used AI to generate this proposal, as I'm not a native English speaker. I'm happy to share more details or clarify any points if needed.
Proposal
Add support for configuring Redis/Valkey with:
- A separate logical database per site.
- A separate Redis/Valkey ACL user per site.
- Explicit database selection via
--redis-isolated=<number>. - Automatic database assignment via
--redis-isolated=new. - Site-specific credentials in the generated WordPress/object-cache configuration.
- Persistent ACL configuration so users survive Redis/Valkey restarts.
CLI behavior
Instead of a boolean flag, the isolated Redis/Valkey database could be selected explicitly:
wo site create example.com --wpredis --redis-isolated=1
wo site create shop.example.com --wpredis --redis-isolated=2
wo site create blog.example.com --wpredis --redis-isolated=new
wo site create existing.example.com --wpredis --redis-isolated
Where:
--redis-isolated=<number>uses the specified Redis/Valkey logical database.--redis-isolated=newautomatically picks the next available database number.--redis-isolatedwithout a value uses the current Redis/Valkey database setting fromwp-config.phpwhen present.- If
--redis-isolatedis used without a value and no database setting is present inwp-config.php, WordOps should assume--redis-isolated=new. - WordOps stores the selected database number in the site configuration.
- WordOps shows the assigned database in
wo site info.
If a database number is already assigned to another WordOps site, WordOps should warn or fail unless the user explicitly confirms reuse.
Main problem: database number management
One practical issue is choosing the correct Redis/Valkey database number for each domain.
When multiple WordPress sites share the same Redis/Valkey instance, the administrator has to manually track which database number belongs to which domain. This is error-prone, especially when sites are added, removed, or migrated.
WordOps could make this explicit by maintaining a mapping such as:
example.com -> database 1 -> user wo_example_com
shop.example.com -> database 2 -> user wo_shop_example_com
blog.example.com -> database 3 -> user wo_blog_example_com
ACL persistence
For Valkey/Redis ACL users, WordOps should ensure the generated users are persisted to disk so they survive service restarts.
For example, Valkey/Redis should be configured with an ACL file:
aclfile /etc/valkey/users.acl
aclfile /etc/redis/users.acl
After creating or updating users, WordOps should save the ACL configuration, for example with:
ACL SAVE
Without this, dynamically created ACL users may be lost after a restart, breaking the object cache configuration for sites.
Why this would help
Using separate databases and users would provide better isolation when hosting multiple WordPress sites on one server:
- One compromised site has less access to cache data from other sites.
- Cache flushes can be limited to one site.
- Redis/Valkey credentials can be scoped per site.
- The domain-to-database mapping becomes explicit and less error-prone.
- Site migrations and troubleshooting become easier.
- ACL users survive Redis/Valkey restarts.
Example WordPress configuration
WordOps could configure the matching Redis/Valkey settings for each site:
define( 'WP_REDIS_HOST', '127.0.0.1' );
define( 'WP_REDIS_PORT', 6379 );
define( 'WP_REDIS_DATABASE', 1 );
define( 'WP_REDIS_PREFIX', 'example_com:7af0c2:' );
define( 'WP_REDIS_PASSWORD', array( 'example_com_7af0c2', '<<generated>>' ) );
define( 'WP_REDIS_CLIENT', 'phpredis' );
define( 'WP_REDIS_TIMEOUT', 1 );
define( 'WP_REDIS_READ_TIMEOUT', 1 );
This is mainly useful for servers hosting multiple WordPress sites, where better separation between sites is desirable.
- 主要言語
- Python
- スター
- 1.6k
- フォーク
- 222
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
WordOps/WordOps のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
-
Fix available in next release
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
WordOps/WordOps の issue をすべて見る
似ている issue
-
follow-up needs-triage S3: minor
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
manaflow-ai/cmux#36856 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue help wanted
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Shell framework build fails at "copy the shader libraries": the iOS shader libraries are now one file b-<chain>.img対応中かも @xiaofeng-han が今日担当しました。 オープンbuild ios
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信