Multi-site Drupal setup

1 June 2009

This is one point of Drupal that is easy to like and dislike in various ways. Setting up multiple sites to run off the same installation would seem relatively easy at first. Rename the default folder to the first site's domain name, and then copy it and rename the second folder to the second site's domain name.

However, after you've done that, there are still a few points which need more setup. You need to actually point the new domain to the old folder.

This is fairly easy in Apache by using the 'Alias' directive. You can simply do: Alias / /path/to/drupal/ inside a <VirtualHost>.

However, this is where I began to encounter trouble. I'd already installed the database for my first site and done customizations and edits. However, there is no extra install.php file to install a blank database for a new site! In fact, I had to temporarily create a new drupal install, 'install' that to the desired db and then remove it. To make it easier, there should at least be an option in the installer to manage sites perhaps.

One could point is that the users/permissions tables can easily be shared as you can designate custom prefixes in the settings.php file which is pretty neat.

Getting URL rewriting working may also be more of a challenge - I'll probably update you all on that later!

 

Comments

Nobody has commented on this post yet.

Add comment

If you wish, you can add a comment.