Skip to content

Configure WP-Stateless media offload for staging - #43

Merged
IanEdington merged 7 commits into
mainfrom
canopy-gcs-media-offload-staging
Sep 15, 2026
Merged

IanEdington merged 7 commits into
mainfrom
canopy-gcs-media-offload-staging

Conversation

@markwong167

Copy link
Copy Markdown
Contributor

Summary

  • Configures WP_STATELESS_MEDIA_BUCKET/WP_STATELESS_MEDIA_KEY_FILE_PATH/WP_STATELESS_MEDIA_MODE in config/environments/staging.php so media offload to GCS works on stateless pods
  • Adds roots/multisite-url-fixer to composer.json, needed so multisite subsites resolve URLs correctly behind a load balancer/reverse proxy
  • Corrects CLAUDE.md, which named the wrong plugin (it said WP Offload Media; the actual plugin in use is WP-Stateless)

Split from #27

Part of splitting #27 into smaller, independently reviewable pieces. This PR covers the GCS media offload + multisite-behind-proxy piece; #27 stays focused on containerization, and a separate PR covers multisite bootstrap/local dev tooling.

Test plan

  • vendor/bin/pint --test passes
  • vendor/bin/pest passes
  • Verify WP_STATELESS_MEDIA_* values are populated correctly once the staging GCS bucket/service account exist

🤖 Generated with Claude Code


Generated by Claude Code

Stateless GKE pods need media writes to go to GCS rather than the
local filesystem. Adds the roots/multisite-url-fixer dependency
alongside it since subsites behind a load balancer/reverse proxy can
otherwise resolve URLs incorrectly. Also corrects CLAUDE.md, which
named the wrong plugin (WP Offload Media instead of WP-Stateless).
claude and others added 6 commits September 1, 2026 14:19
config/environments/staging.php (this branch) defines
WP_STATELESS_MEDIA_BUCKET/KEY_FILE_PATH/MODE, but nothing in
composer.json actually installed the WP-Stateless plugin that reads
those constants — the config was inert.

Note: repo.wp-packages.org isn't reachable from this sandbox
(org egress policy), so composer.lock could not be regenerated here.
Needs `composer update wpackagist-plugin/wp-stateless` from an
environment with access before merge.
…om pint

Both packages this branch adds to composer.json land as vendor code
(web/app/plugins/wp-stateless, web/app/mu-plugins/multisite-url-fixer)
that isn't ours to lint, same as the other composer-managed plugin
dirs already excluded here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016sw43Z5pXLtGFQesALit7k
repo.wp-packages.org isn't a WPackagist-style mirror of free
WordPress.org plugins (it resolved roots/multisite-url-fixer, but
that package comes from plain Packagist.org, not this custom repo).
`composer update wpackagist-plugin/wp-stateless` failed outright with
"could not be found in any version" because nothing in
composer.json's repositories list actually serves that package.
Adding the standard https://wpackagist.org mirror, which carries free
WordPress.org plugins/themes under the wpackagist-plugin/*
and wpackagist-theme/* vendor names this composer.json already uses.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016sw43Z5pXLtGFQesALit7k
@IanEdington
IanEdington merged commit 519f7d2 into main Sep 15, 2026
@IanEdington
IanEdington deleted the canopy-gcs-media-offload-staging branch September 15, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants