Hello,
I've been playing with Drupal for a while and I decided to test a multisite install with my professional website. The idea was also to use as few modules as possible. Or specific modules for a site.

The results are here :
http://www.pragmaclic.com
http://www.pragmaclic.fr
http://www.pragmaclic.info
Apologies to all non french speakers, this site is still in french as I need to play a bit more with i18n to integrate it.

I use 3 database (one for each site) and it's the only point I have mixed feelings... I wish I could use some tables in common for all versions.
Anyway, it was so easy to configure (once you read carefully how to) that's incredible.
I use three themes, one for each site for the time being, but I'm going to uniformise all versions to a single one.

It makes the maintenance a piece of cake. I love it!

Feedbacks welcome!

@+
--
Stéphane Carpentier

Comments

Christoph C. Cemper’s picture

Hi,

if the content is all the same, then why not use the same database?

but beware: that could lead to a caching problem as I had here
http://drupal.org/node/66066

best,christoph

--- http://www.cemper.com
--- http://weblog.cemper.com
--- http://www.marketingfan.com

sKanD’s picture

The front page of each site is the same because I wanted to make my customers feel they are in the same vision.
But I have separate contents :

  • pragmaclic.com is for the products and services, the customers and their feeds;
  • pragmaclic.fr is the way to say something like : here, who I'm and what I think through my blog, see if we can work together
  • and pragmaclic.info is for... informations because I do find people around where I live who still think webmaster is the hobby of their next-door neighbour's teenager...

The content separation through the different tld is assumed, though it might be obscure for passers-by who drop on my site.

For the caching problem, I havn't experienced it yet because it is disabled for the time being. I thank you to highlight that point for me! ;-)
--
@+
sKanD
aka Stephane Carpentier

narres’s picture

If you would look at your settings.php you would see a section:

* $db_prefix = array(
* 'default' => 'main_',
* 'users' => 'shared_',
* 'sessions' => 'shared_',
* 'role' => 'shared_',
* 'authmap' => 'shared_',
* 'sequences' => 'shared_',
* );

As you are able to use one core drupal installation with several settings.php:
* For example, for a fictitious site installed at
* http://www.drupal.org/mysite/test/, the 'settings.php'
* is searched in the following directories:
*
* 1. sites/www.drupal.org.mysite.test
* 2. sites/drupal.org.mysite.test
* 3. sites/org.mysite.test
*
* 4. sites/www.drupal.org.mysite
* 5. sites/drupal.org.mysite
* 6. sites/org.mysite
*
* 7. sites/www.drupal.org
* 8. sites/drupal.org
* 9. sites/org
*
* 10. sites/default

you sgould be able to solve your problem with different:
./sites/www.pragmaclic.com/settings.php
./sites/www.pragmaclic.fr/settings.php
./sites/www.pragmaclic.info/settings.php
settings.

Keep the sunny side up

Thomas Narres
Keep the sunny side up

sKanD’s picture

I completely skipped that part. That's fantastic!
I focused on the site configuration and completely missed the database configuration. Silly me...
One more good reason to keep using drupal. :D

> Keep the sunny side up
Oh yes, that's really good news!

Thanks a lot!
--
@+
sKanD
aka Stephane Carpentier

idcm’s picture

I am not a coder or sys admin so please forgive my need to specific guidance? I am using 4.6. Is your guidance only for 4.7? If not, can you advise on the following please?

This is my situation with ficticious domain names:

1. My site is http://domainname1.com and the db name is abcd5. It's settings.php file is in sites/default and points to abcd5 db and base_url domainname1.com. Nothing else in settings.php has been enabled or edited.
2. Hubby wants a site so a bought him domainname2.com from the ISP where my domainname1 site resides.
3. I created a dir in the sites dir (sites/domainname2) for his settings.php file. I edited his settings.php file to point to the abcd2 db and the base url of domainname2.com
4. Of course, I created the abcd2 db and installed the default drupal tables so he can have his own data

My confusion is, when I enter http://domainname2.com in a browser, how does it know where to go? Where do I tell the ISP to point this domain name? Once it is pointing to the right place, how does drupal know to show domainname2.com?

Based on your guidance, I am thinking i might need to rename something, right? Does your message say that I should rename the dir's in my site dir

-- from default to domainname1.com
-- from domainname2 to domainname2.com

If not, what do I do? Please be specific.

thanks
Cindy

idcm’s picture

I got impatient so I ventured on my own. Based on several different forum threads, I went ahead and convinced my ISP to help me experiment. By the way, if you are looking for a good ISP, I take my friends and clients to Prohosters at http://prohosters.com/. (They merged with Carpathia some years ago). Anyway, they are not an official drupal service but they have installed or helped install three instances so far for me.

Anyway, got it working. Thanks to everyone who gave me the bits to make it possible.

vmlsd’s picture

could you tell me how you got it worked. I also have the same problem. thank.

darumaki’s picture

Where are the instructions on how to setup multi-sites ?