Configure multisite network and fix local bootstrap tooling - #44
Open
markwong167 wants to merge 2 commits into
Open
markwong167 wants to merge 2 commits into
markwong167 wants to merge 2 commits into
Conversation
Derives DOMAIN_CURRENT_SITE from WP_HOME instead of duplicating it in .env.example, fixes the DISABLE_WP_CRON operator so an explicit false survives CONVERT_BOOL, and adds the multisite/cron config. Rewrites bin/setup-local.sh to use `wp core multisite-install` (which handles both an empty DB and an existing single-site DB in one step) instead of `wp core multisite-convert` (which requires WP-CLI to resolve an existing site first — impossible once MULTISITE is already true with no network row yet). Fixes two more bugs found while verifying that change: `wp site create` has no --url option, and a domain with a port isn't a valid email address for the throwaway local admin account. Also adds bin/bootstrap-secrets.sh for pulling real secrets from GCP Secret Manager into a local .env.local. Verified end-to-end against both a portless and a port-having WP_HOME.
3 tasks
No k8s CronJob (or other real-cron replacement) exists yet in gpo-platform-configs to hit wp-cron.php on a schedule. Disabling WP's pseudo-cron by default here would have silently stopped scheduled posts, plugin cron, etc. on staging/production the moment this merged. Reverting to the current behavior (pseudo-cron stays on unless DISABLE_WP_CRON is explicitly set) until that replacement lands; the development.php override is now redundant and removed with it. Multisite config itself is unchanged.
markwong167
marked this pull request as draft
September 1, 2026 19:48
markwong167
marked this pull request as ready for review
September 2, 2026 20:09
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
DOMAIN_CURRENT_SITEfromWP_HOMEinstead of requiring both in.env.example, preserving the port when present (needed for local dev servers on non-standard ports)DISABLE_WP_CRONoperator (?:→??) so an explicitfalseisn't silently overwritten back totruebyCONVERT_BOOL.env.example(no object-cache plugin is installed yet)bin/setup-local.shto usewp core multisite-installinstead ofwp core multisite-convert— the latter requires WP-CLI to resolve an existing site before running, which fails onceMULTISITEis already hardcodedtruewith no network row yet.multisite-installhandles both an empty DB and an existing single-site DB in one step without that ordering requirement.wp site createhas no--urloption (it was being misread as the global bootstrap-target flag), and a domain with a port isn't a valid email address for the throwaway local admin accountbin/bootstrap-secrets.sh, a local dev tool for pulling real secrets from GCP Secret Manager into.env.localSplit from #27
Part of splitting #27 into smaller, independently reviewable pieces. This PR covers multisite network config and local bootstrap tooling; #27 stays focused on containerization, and a separate PR covers the staging media offload config.
Test plan
vendor/bin/pint --testpassesvendor/bin/pestpassesbin/setup-local.shverified end-to-end in a sandbox against both a portless and a port-havingWP_HOME— installs the network, creates the seed subsite, activates network plugins, with no errors🤖 Generated with Claude Code
Generated by Claude Code