Configure WP-Stateless media offload for staging - #43
Merged
Merged
Conversation
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).
3 tasks
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
…/gpo/canopy into canopy-gcs-media-offload-staging
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
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WP_STATELESS_MEDIA_BUCKET/WP_STATELESS_MEDIA_KEY_FILE_PATH/WP_STATELESS_MEDIA_MODEinconfig/environments/staging.phpso media offload to GCS works on stateless podsroots/multisite-url-fixertocomposer.json, needed so multisite subsites resolve URLs correctly behind a load balancer/reverse proxyCLAUDE.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 --testpassesvendor/bin/pestpassesWP_STATELESS_MEDIA_*values are populated correctly once the staging GCS bucket/service account exist🤖 Generated with Claude Code
Generated by Claude Code