Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Multisite mode #499

Closed
adamziel opened this issue Jun 2, 2023 · 3 comments
Closed

Multisite mode #499

adamziel opened this issue Jun 2, 2023 · 3 comments
Labels
[Aspect] Browser [Type] Developer Experience [Type] Enhancement New feature or request [Type] Exploration An exploration that may or may not result in mergable code [Type] Mindmap Node

Comments

@adamziel
Copy link
Collaborator

adamziel commented Jun 2, 2023

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.

@adamziel adamziel added [Type] Enhancement New feature or request [Aspect] Browser [Type] Developer Experience [Type] Exploration An exploration that may or may not result in mergable code labels Jun 2, 2023
@adamziel adamziel mentioned this issue Jun 5, 2023
@adamziel adamziel mentioned this issue Oct 4, 2023
10 tasks
@adamziel
Copy link
Collaborator Author

#888 proposes a working enableMultisite Blueprint step.

@adamziel
Copy link
Collaborator Author

This opens questions about the Blueprint format:

  • Should there be a createSite step now? Or is that better left to PHP?
  • Should steps like installPlugin now accept a siteId argument? We don't know the site ID upfront, though.

@adamziel
Copy link
Collaborator Author

adamziel commented Jan 29, 2024

The enableMultisite step was merged in #888. I'll close this issue. Let's track any follow-up feature requests and fixes separately.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
[Aspect] Browser [Type] Developer Experience [Type] Enhancement New feature or request [Type] Exploration An exploration that may or may not result in mergable code [Type] Mindmap Node
Projects
No open projects
Development

No branches or pull requests

1 participant