Multisite mode
adamziel opened this issue · 3 comments
adamziel commented
Description
Let's add an easy way to start Playground in a Multisite mode. Perhaps a predefined Blueprint triggered by ?multisite would do the trick? Like this one used to support gutenberg-pr:
Technical steps
Multisite settings can be enabled using the following Blueprint:
{
"landingPage":"/wp-admin/network.php",
"steps": [
{ "step":"login" },
{
"step": "defineWpConfigConsts",
"consts": {
"WP_ALLOW_MULTISITE": true
}
}
]
}You still need to manually deactivate the importer plugin to be able to configure the network:
Once you do, WordPress asks you for the typical multisite setup:
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', false );
define( 'DOMAIN_CURRENT_SITE', 'playground.wordpress.net' );
define( 'PATH_CURRENT_SITE', '/scope:0.4195830517819887/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );These constants can be set using the "defineWpConfigConsts", except it's not straightforward for the scoped path.
adamziel commented
This opens questions about the Blueprint format:
- Should there be a
createSitestep now? Or is that better left to PHP? - Should steps like
installPluginnow accept asiteIdargument? We don't know the site ID upfront, though.