Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In #2306013: Multisite is a valued feature that will not be deprecated. is was suggested that Drupal's multisite functionality be scrapped. A key rationale was because a) the documentation was alleged to be not very good, b) it could be tricky to set up. Rather than scrapping the functionality, lets improve the documentation with concrete examples on how it works and how to use it.
Comments
Comment #2
shrop CreditAttribution: shrop at Mediacurrent commentedWe need to know where all the docs and mentions are for multisite. Thought I would list a few spots that I have found:
Multisite Drupal documentation
Drupal 7.x
Drupal 8.3.x
Comment #3
btopro CreditAttribution: btopro commentedINSTALL.txt in D7
core/INSTALL.txt in D8.3.x
and settings.php files in each would be the most critical as far as improving documentation in the code that goes out the door.
In looking at the documentation on d.o. I think it's pretty good, though it might want to include more cautions / use cases instead of just pointing to The Great Multisite Debate (which is also very useful to point to). The D7 INSTALL file technically points to the wrong location (D6 docs) but then gets redirected over to - https://www.drupal.org/docs/7/multisite-drupal/multi-site-sharing-the-sa... which is a very good starting point.
Comment #4
btopro CreditAttribution: btopro commentedCleaned up some of the documentation associated with when to multisite as well as started a recommended multisite configuration settings -- https://www.drupal.org/docs/7/multisite-drupal/multi-site-sharing-the-sa...
Comment #6
kienan CreditAttribution: kienan commentedHas anyone found or made documentation that details how to use composer in a multi-site? All the documentation I've found so far deals with using composer at the drupal-wide level (the root composer.json).
As modules start to require composer to resolve their dependencies, it isn't obvious (at least to me) how to properly handle that in a multi-site installation. Running composer init and setting dependencies in the site directory doesn't work since anything like "composer require drupal/module_name" will depend on drupal itself and install drupal/symfony/etc. in the vendor/ directory of the site.
Comment #7
clemens.tolboom@kienan for D7 use https://www.drupal.org/project/composer_manager and read their D8 section too.
Comment #8
kienan CreditAttribution: kienan commented@clemens.tolboom, thanks but those pages don't seem to address the situation I'm looking at.
I'm working principally with Aegir for hosting sites in common platforms (drupal core installations). A certain number of dependencies are managed at the platform level, through either composer or drush make. The workflow with composer at this level is clear and detailed in the current documentation.
Everything in the site can be treated as a separate project which depends on the platform - not too dissimilar to the drupal-composer/drupal-project template; however, the site isn't placed in sites/default.
As a developer of a site hosted in a multi-site environment I want to be able to:
Consider a drupal-site project organized thusly:
projectdir
-- composer.json
-- tests
-- ....
which will eventually live in a deployed environment like drupal-8.3.2/sites/projectdir
If I require drupal/search_api and drupal/search_api_solr (search_api_solr, must be installed with composer), the entire drupal stack is pulled in - which is fine. As far as I have seen (and I could easily have missed it), the sites/X/vendor directories aren't autoloaded. There's of course an issue trying to figure out the minimum dependencies to keep in the sites/X/vendor. In short, I can't reasonably install a contrib module which requires composer in a site directory.
There might be some possible some solution in the vein of the composer-merge-plugin or drupal-merge-plugin that I haven't fully explored.
At any rate, if someone comes up with a good way to manage this I'd love to hear about it.
Comment #13
colan@kienan: See #3004496: Improve multisite compatibility with composer for some discussion on multisite + Composer.