Skip to content

[multisite:command] Add Command for creating multisite using Drupal console #2253

Closed

Description

@Ashwini7

Problem / motivation

It's really difficult to create multi site with so many configuration and creating the directories for specific sub sites.

Solution

Command should contains most of the config of multisite creation.

Config options:

  1. --file => create a copy of example.sites.php to sites.php in sites/ directory.
  2. --site-name => copy the default directory to your site name directory into sites/ directory.

Activity

  1. changed the title [-]Proposed : Add Command for creating multisite using Drupal console[/-] [+][multisite:command] Add Command for creating multisite using Drupal console[/+] on May 13, 2016
  2. jludwig commented on May 26, 2016

    @jludwig
    Contributor
  3. Ashwini7 commented on May 26, 2016

    @Ashwini7
    ContributorAuthor

    Sure @jludwig Please assign it to yourself. Also, it would be great if you can share the workflow of multisite command of yours.

  4. jludwig commented on May 26, 2016

    @jludwig
    Contributor

    @Ashwini7 I haven't figured out how to assign it to myself yet. Here's the --help output for it (without the global options):

    Usage:
      multisite:new [options] [--] [<sites-subdir>]
    
    Arguments:
      sites-subdir               Name of directory under 'sites' which should be created.
    
    Options:
          --site-uri[=SITE-URI]  Site URI to add to sites.php
          --copy-install         Copies existing site from the default install.
    
    Help:
     The multisite:new command assists in setting up new multisite installs by creating the needed subdirectory and files, and can optionally copy an existing 'default' installation
    
    

    So, if someone wants to just create a directory with a settings.php file they could do:

    $ drupal multisite:new files_only

    If they wanted to instead copy what was already installed on default and add it to sites.php they could do:

    $ drupal multisite:new --site-uri copy-install.localhost --copy-install copy_install

    At this point, sites.php will have an entry with copy-install.localhost, and the copy_install directory will have the settings.php from /sites/default and the files directory placed there. If the files directory is located elsewhere, this needs to be handled manually right now.

    A related issue is that site install fails when sites.php is present (issue #2333). On my own installs, I've scripted site:install to move sites.php out of the way before executing site:install. multisite:new currently detects and uses as the base for sites.php if the actual sites.php is not present, but I don't want to include that in the pull request until figuring out what will be the actual solution to #2333.

  5. jludwig commented on May 26, 2016

    @jludwig
    Contributor

    Pull request: #2335

  6. jludwig commented on Jun 13, 2016

    @jludwig
    Contributor

    @Ashwini7 does this fulfill your need?

  7. Ashwini7 commented on Jun 14, 2016

    @Ashwini7
    ContributorAuthor

    @jludwig Great work! I haven't tested yet. I am hospitalized facing some medical problem. I will look into once I am back to work. Feel free to resolve this issue. If you think issue has been addressed in your PR.

    Thanks!

  8. Ashwini7 commented on Jun 14, 2016

    @Ashwini7
    ContributorAuthor

    @jludwig Great work! I haven't tested yet. I am hospitalized facing some medical problem. I will look into once I am back to work. Feel free to resolve this issue. If you think issue has been addressed in your PR.

    Thanks!

  9. Ashwini7 commented on Mar 15, 2019

    @Ashwini7
    ContributorAuthor

    I believe this feature already checked in to drupal-console long back. Hence, closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions