16 votes
Accepted

Programmatically get current multi-site instance name

Thanks to @Clive for telling me about DrupalKernel::findSitePath which takes the current $request to then return the path of the matching multi-site directory. And thanks to @4k4 for the tip that ...
leymannx's user avatar
  • 18k
9 votes
Accepted

Deprecate multisite in 8.x for removal in 9.x

You have a few questions there, so I'll hit them individually: How serious is deprecation in 8.x and removal plan of multi-site in drupal 9? the topic is in category of plan for two years. It's ...
Jaypan's user avatar
  • 17.4k
7 votes
Accepted

Are shared user tables still supported and working?

Don't. Per table-sharing is a relict of the past, deprecated and will be removed in Drupal 9. With all the layers on top that dynamically create tables for fields, cache invalidation and so on, this ...
Berdir's user avatar
  • 83.1k
5 votes
Accepted

Drupal 8 - how to run multisite using one database

First, read this page on Drupal 8 multisite, https://www.drupal.org/node/2297419. It should give you a good idea of what you have to do in order to get multisite working and also explain some of the ...
Kimi's user avatar
  • 501
5 votes

How do you use 'drush site-install' to install a multisite with separate databases using a single command?

In the link you provided, @greg_1_anderson mentioned using --sites-subdir. This option is used to create a site folder under <DRUPAL_ROOT>/sites/. For example, if you run drush si --sites-...
Jimmy Ko's user avatar
  • 2,871
5 votes
Accepted

How can I override the node template for one multi-site instance?

I once had a question on how to get current multi-site instance name. You can use the accepted answer's code to add another template suggestion based on the name then: /** * Implements ...
leymannx's user avatar
  • 18k
4 votes
Accepted

Theme structure for multi-site

If they only differ in color, you should provide a theme setting for choosing it and setup the theme in /themes/custom/mymulticolortheme, so it will become available for all sites. Otherwise you have ...
Philipp Michael's user avatar
4 votes

How much time does it take to manage sites within a multisite architecture as compared to multiple single installs?

Short: It really depends. Long: Each individual multisite installation adds complexity to the whole. If these 70 sites are more ore less the same in terms of individual content but (nearly) same ...
Volker's user avatar
  • 1,370
4 votes
Accepted

How can I replace drush @sites?

Waiting something similar, I wrote this small script I called "drall" you may adapt: #!/usr/bin/php <?php // Path to sites.php file. include('web/sites/sites.php'); $done = []; $argv = $_SERVER['...
Oulalahakabu's user avatar
  • 1,313
3 votes
Accepted

Sharing the same code base and one database

This is very much possible using the domain module: "The Domain Access project is a suite of modules that provide tools for running a group of affiliated sites from one Drupal installation and ...
schnippy's user avatar
  • 5,339
3 votes
Accepted

Multi-site clear cache

You can easily configure drush aliases for this. Having properly configured drush brings so many benefits, especially if you work with multiple environnements for your sites. As an example, say you ...
stefgosselin's user avatar
  • 2,941
3 votes
Accepted

Fixing Multi-site files path

You may be aware of this. Change file path for individual sites at Configuration/Media/File system. By default it is set to sites/default/files. So your both sites are addressing same path. So just ...
CodeNext's user avatar
  • 3,721
3 votes

Installing / updating modules in multi-site environment

You have described the options for multisite pretty well: Lots of shared code by putting modules in /modules Lots of copies of module code by moving to /sites/[sitename]/modules but only one copy of ...
acrosman's user avatar
  • 2,728
3 votes
Accepted

How do I add a site to a multi-site

You have the sites.php file in the wrong spot, it should be at sites/sites.php, it should not be inside any of the site directories, such as sites/original2.com/sites.php.
sonfd's user avatar
  • 7,871
3 votes

Different content, one database

Yes it is possible. Use the Domain module. But if the sites will not share any data, no special modules are needed. Set a unique “Table name prefix” when installing Drupal on each site instance.
cilefen's user avatar
  • 5,830
2 votes

What happens when multiple context conditions match?

Context starts from top and moves downward on all your created contexts and will stop on the first one to trigger it. This is why your context A is being displayed. You have a few options... Set a ...
jsidigital's user avatar
2 votes
Accepted

Need Steps to Install multisite configuration using only drush. i.e multi-site install having different database

Try: drush site-install --db-url=mysql://USER:PASS@localhost/DATABASENAME --sites-subdir=sitename You may also need to add --db-su and --db-su-pw if necessary to provide the right credentials to ...
greg_1_anderson's user avatar
2 votes
Accepted

How do I specify a parent domain in a multi-site install?

It is called multi-site aliasing, hence the results. Drupal offers you to server multiple domains from the same folder in order to preserve the paths in the database. So you would use the same folder ...
nhck's user avatar
  • 156
2 votes
Accepted

background-image and sites.php

It sounds like you're confusing hostnames with file system paths. The array mapping in sites.php is: Hostname => Instance Folder So taking your example, requests for http://mysite.example....
Clive's user avatar
  • 167k
2 votes
Accepted

How do I move a group of nodes to another Drupal instance?

For the scenario you describe, i.e. a once-off, one-way move from one site to another, automated with drush, Node Export is a good way to do it. You can use the node_export_import() function in your ...
Frank H.'s user avatar
  • 804
2 votes

How do I move a group of nodes to another Drupal instance?

What would suit you is the Deploy module: https://www.drupal.org/project/deploy The README.txt states: The Deploy module is used to deploy Drupal content to other Drupal sites or arbitrary systems. ...
Daniel Tome's user avatar
2 votes

Drush make and multisite

By checking the drush code itself, we discovered the possibility to add contrib_destination on specific project level. projects[views][] = "" projects[views][contrib_destination] = "sites/site1" ...
vbouchet's user avatar
2 votes
Accepted

Convert two existing sites to multisite

Yes. Configure an apache virtual host for each site. They look something like this: <VirtualHost *:80> DocumentRoot "/path/to/drupal/install" ServerName mysite.example.com </...
cilefen's user avatar
  • 5,830
2 votes
Accepted

Multisite files folders

Verify your configuration at admin/config/media/file-system on the multisites. "Public file system path" may be configured to sites/default/files.
cilefen's user avatar
  • 5,830
2 votes

Multiple sites and performance in Drupal 7

My recommendation is to go with a multisite. Multiple Drupal instances and multisite are about the same in terms of performance (multiple databases). One Drupal instance will not scale as well and ...
mikeytown2's user avatar
  • 8,312
2 votes

How to split content for different target audience?

@max I am assuming that since there is a 1-1 relation between 'private' and 'business' content, you are probably just hiding (restricting) content in on of the two. So if for example, your 'private' ...
JP Dippenaar's user avatar
2 votes
Accepted

Share nodes and users across multiple sites

Sharing users can be done by setting up OpenAuth or something like it. Sharing nodes can be done using views database connector this tool will let you pull data from a table in another database. To ...
Daniel Lefebvre's user avatar
2 votes
Accepted

How do I create a site inside another one?

It's possible, but usually not really recommended solution - as we have subdomains/multisites in Drupal. But basicly only thing that will probably need small adjustments is .htaccess, make sure to ...
Szymon Jankowski's user avatar
2 votes

Deprecate multisite in 8.x for removal in 9.x

I've used Aegir for multi site management, great tool! If you have ever used Amazon Web Services, it's similar like that but for Drupal. With a click of a button you can launch specific site builds. ...
No Sssweat's user avatar
  • 31.1k

Only top scored, non community-wiki answers of a minimum length are eligible