2 Commits
Author SHA1 Message Date
kevinveenbirkenbachandClaude Opus 5.5 f46e1f045e fix(web-app-wordpress): converge existing child sites onto their domain and URLs
sites.php only created missing child sites and left an existing one
alone, so a network whose sites still sat on the legacy slug domain
<domain>.<network domain> (wp site create --slug), or carried a stale
home or siteurl, never converged.

- A site on the exact legacy slug domain and network path moves onto
  its own domain and path. The run halts when a site already serves
  that domain or when the legacy domain is itself a listed site.
- home and siteurl of every listed site are set to its URL, read raw
  with the option_home/option_siteurl filters removed, and the run halts
  when WordPress refuses the write.
- Every create, move or URL write prints CHANGED <url>, which the task
  reports as changed; a second run prints nothing.

The legacy-slug move follows the same idea as dda51499a4 on the IAM
line, on main's WP_MS_SITE_URLS interface and with conflict checks.
SitesTest covers the move, the www network domain, the raw read, the
idempotent second run, unrelated sites and both halts; the harness
records moves under moved_sites because the script's own $moved shares
its global scope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 02:07:49 +01:00
kevinveenbirkenbachandClaude Opus 5.5 b5736bda44 feat(web-app-wordpress): serve each multisite site on its own network sibling
CI run 40979252521 WordPress#1 (multisite, multi network): a request on a network sibling resolved to the clearnet site, because WordPress picks the site by Host before any mu-plugin runs and the network kept only clearnet base URLs per site. Operator decision: a real multisite per network with real child domains (option B).

infinito-network-origins.php is now also installed as wp-content/sunrise.php (SUNRISE=true), so the sibling host resolves to its own site before mu-plugins load; a guard constant stops the second load from mu-plugins. WORDPRESS_SITE_DOMAINS holds the canonical domains in the first domain's network, WORDPRESS_NETWORK_BASE_URLS carries every sibling of each site's base URL (sites ';', siblings ','), and INFINITO_NETWORK_BASE_URLS takes that list. Child sites are inserted by files/php/multisite/sites.php only where no site exists on the domain and path, replacing wp site list plus wp site create. The multisite variant's child domains move from server.domains to domains.canonical.

Covered by 29 Python tests and two PHPUnit suites; PHPUnit and a variant 1 deploy with an onion pass still have to run (store-i18n gate and deploy).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 18:49:33 +01:00