Multisite on Drupal 7

mindre end 1 minutters læsning

It is fairly easy to use one Drupal 7 code base for several sites. However, you need one database for each site, so you cannot share users across the sites. If you know an easy workaround to share users, please advice in the comments.

What I did?

I did the installation on a Dreamhost shared server with ssh access.

First, I created one database for each site.

Second, I created the domains. When you create a domain at Dreamhost, it will create a web accessible folder:

/home/user/larsolesen.dkThird, I put the Drupal 7 files into the web accessible folder of the first domain.

Fourth, I created symbolic links so the other web accessible folders knows where to find the installation. The symbolic links were created as follows:

ln -s anothersite.dkFifth, I created extra site folders in the Drupal 7 folder /sites/. The folders should just be named the domain name, so for instance Underneath that folder I created a settings.php file and af files folder like you would do on a single site install under default.

Now, that is about it for doing a multisite Drupal 7 install on the same codebase with different databases.


João Antonio

Hi Lars, Thanks for your post. What about using the same database, same codebase, but another template? Suppose one template for Desktop Access and another to Mobile access. Any Idea ?


Thank you for posting this, I was trying to figure out what would be the best way to get my sites running off of one Drupal 7 multi site instance.


Thanks for this article! I wondered what would happen to the installed modules. Due to the fact that in Drupal 6 you had to copy all module-files manually in the sites/all - folder to make them usable for all sites: This seem to be the standard in Drupal 7. All modules installed by the GUI are copied to sites/all/modules. Hence can be used by every page. Didn`t try that one out yet, but seems to be the case.


I have ssh access to my linux server. On that I will just use the command stated in the post directly from the commandline. I am not sure about Windows, but I would think you just need to right click?

Skriv en kommentar

Din e-mail bliver ikke offentliggjort. Obligatoriske felter er markeret *