Conversation
…ts-multisite-support
…ts-multisite-support
…ts-multisite-support
…ts-multisite-support
…ts-multisite-support
📊 Performance Test ResultsComparing 4762b27 vs trunk site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
There was a problem hiding this comment.
I tested this PR and I confirm I was able to create a new site using a blueprint with enableMultisite step. Feature wise it behaves as described in the PR.
I have two concerns that could be raised by users once we make multisites easier to create.
- AFAIK, Users won't be able to Push these sites to WordPress.com and only some Pressable sites support it. I wonder if we should at least keep a warning for this step.
- There are some warnings visible in wp-admin:
Warning: file_get_contents(/wordpress/wp-content/plugins/{SQLITE_PLUGIN}): Failed to open stream: No such file or directory in /wordpress/wp-includes/functions.php on line 6910
Warning: file_get_contents(/wordpress/wp-content/plugins/sqlite-database-integration/load.php): Failed to open stream: No such file or directory in /wordpress/wp-includes/functions.php on line 6910
- The assumption of a custom domain being required is false. I was able to setup a Multisite using localhost:8881 port.
Blueprint I used for testing: enableMultisite-blueprint.json
Step is allowed and the custom domain is forced:
wp-admin warnings:
Multisite using localhost
I noticed that the site created with the blueprint added this first line in the wp-config.php : $_SERVER['HTTP_HOST'] = json_decode(base64_decode('InRlc3QtbXUtc2l0ZS53cC5sb2NhbCI='), true);, so I used a similar setting in my localhost Multisite and worked great. I was able to restart the server without errors in Studio:
/* Multisite */
$_SERVER["HTTP_HOST"] = "localhost:8886";
define("WP_ALLOW_MULTISITE", true);
define("MULTISITE", true);
define("SUBDOMAIN_INSTALL", false);
define("DOMAIN_CURRENT_SITE", "localhost:8886");
define("PATH_CURRENT_SITE", "/");
define("SITE_ID_CURRENT_SITE", 1);
define("BLOG_ID_CURRENT_SITE", 1);
@bcotrim, should we allow users using localhost:port?
@sejas let's keep the UI clean, the purpose of this PR is to avoid blocking features that can work in Studio and to reduce the number of unnecessary warnings. |
Were you able to start a site in Playground CLI without a domain? I didn't introduce that restriction, on my tests, creating a multisite using Playground CLI blueprint would result in an error if a domain wasn't provided. |
| blueprintSuggestedSiteName, | ||
| setBlueprintSuggestedSiteName, | ||
| blueprintRequiresCustomDomain, | ||
| setBlueprintRequiresCustomDomain, |
There was a problem hiding this comment.
Some of the logic here is similar to the logic in use-blueprint-deeplink.ts . This is not specifically related to this PR but we could refactor it in some kind of shared helper. What do you think?
katinthehatsite
left a comment
There was a problem hiding this comment.
thanks for fixing the warnings @bcotrim - I no longer see them:
It would be nice if this notice had a background or so to stand out more but I think it is a minor design thing:
|
thanks for the review @katinthehatsite @sejas do you agree to land this with the domain restriction, or should we try to look more into it, and check with Playground if there's a way we can allow sites without a custom domain? |


Related issues
Proposed Changes
Allow
enableMultisiteblueprint stepenableMultisitefrom the unsupported blueprint features list, allowing blueprints to configure WordPress multisiteBump
@wp-playgroundpackages to 3.0.54$_SERVER['HTTP_HOST']handling in multisite, which fixes site restart failuresAdd multisite validation (CLI + Desktop)
CLI: Error early when a blueprint contains
enableMultisitebut no--domainflag is provided. Multisite doesn't support custom ports, so a custom domain is required.Desktop app: When a blueprint with
enableMultisiteis detected:Shared utility
blueprintHasMultisite()helper incommon/lib/blueprint-settings.ts, used by both CLI and desktopTesting Instructions
CLI
enableMultisitestepnpm run cli:build && node dist/cli/main.js site create ~/test-multisite --blueprint /tmp/multisite.json--domain--domain test.local— should proceed normallyDesktop
enableMultisite(e.g., via deeplink)Tests
Pre-merge Checklist