Skip to content

Multisite mode #499

@adamziel

Description

@adamziel

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:

function applyGutenbergPRSteps(prNumber: number): StepDefinition[] {

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
           }
       }
    ]
}

Direct link

You still need to manually deactivate the importer plugin to be able to configure the network:

CleanShot 2023-06-02 at 15 25 19@2x

Once you do, WordPress asks you for the typical multisite setup:

CleanShot 2023-06-02 at 15 31 16@2x
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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions