Hi everybody!

I'm planning a new project where we will have to create more than 200 sites with diferent content, appearance, maybe diferents plug-ins and maintain those sites periodically.

My question is: ¿Could I to do that with drupal Multi-site? ¿Could I maintain this amount of sites in a completly diferents domains?

If anyone could help me I will be very thankful.

Comments

vm’s picture

If you aren't sharing anything between the sites I'd say don't use the multisite feature.

Here is why:
To update or upgrade you will have to put all 200 sites offline at same time and update each one by one. If you run into a situation during an update or upgrade you are now stuck in the mud.

Where as if you keep your installs seperate with their own core, you can do every site one at a time. While multisites does indeed save some time. I find that the best way to use multisite is when creating a dev and a production environment.

viebone’s picture

Thanks for your reply!

Maybe I don understand what is multi-site for.

I need to maintain theese 200 site updated, so they have to share the code base and some plug-ins.

My challenge is to create a very useful model of web site, this web site will have a few characteristics, and once I'll have this model created i will clone it 10, 50, 100 or 200 times.

Before the clonation each site will be able to have its own content and appaerance but I must be able to update all these sites easily, do you know what i mean?

Thanks!

vm’s picture

Even with a multisite you would update the core files but you would have to run update.php for each site individually, so that each and every database is updated. Unless you doing something like what is mentioned below by gpk, from the command line or writing a script to so something for you. Which is over my head.

What multisite is for can be different for every one asked.

Multi site feature is neat and I used it once before but to be honest I didn't see the point in having so many sites working off of one core so I eventually worked away from it and only use it to have a main production site and a dev site using the same code base. Otherwise, I don't use it.

aireworth’s picture

Hi VM,

Is there much performance hit from running multiple instances of Drupal in the same document root, do you know? And are there any potential problems from running different versions of Drupal (5.7 and 6.6 for example ) in the same doc root at the same time?
I've done it several times on my testing machines (with separate DBs of course) and not had any problems, but was wondering if this approach was safe for production.
It certainly seems a lot easier and quicker to set up than multisite from one Drupal instance

Colin

vm’s picture

I don't believe there is a performance issue with using 5.x and 6.x in the same doc root. Matter of fact, I have side by side installs of D5 and D6 on my hosting account so I can work between the two of them. Though they are only for developing purposes and aren't out there to grab traffic.

gpk’s picture

Agreed, there is no particular performance hit from running multiple instances of different versions of Drupal - you simply have however many PHP-based sites running concurrently. However there are potential performance benefits from running multisite, depending on your server setup and how busy the sites are. For example, if you are using a PHP opcode cache then having 100 copies of the same codebase running would need that much more available RAM to store the cached opcodes in memory.

Setting up a site as "multisite" is not inherently harder or slower than a default install. You just create folder sites/example.com for all site-specific stuff instead of using sites/default. As I said, it depends on your way of working, but for example I like the ability to make new functionality xx available to all the sites simply by uploading the relevant module (once) to sites/all/modules.

gpk
----
www.alexoria.co.uk

aireworth’s picture

Yes I understand that multisite is not that difficult - you just need to understand virtual host configuration in apache. But running multiple copies of drupal from the same doc root does allow you to run different versions on the same machine, and - at least for testing purposes where I'm not accessing the sites by the real domain name, you can set up several without touching vhosts at all.

But can 2 different versions running in the same doc root cause a conflict?

Colin

gpk’s picture

Obviously you need to keep each separate version in its own folder but apart from that there are no issues since they are thereby separate.

gpk
----
www.alexoria.co.uk

jfmoore’s picture

Excellent tutorial on multiple sites vs multi-sites at GotDrupal if you haven't already found it and are still struggling with this:

http://gotdrupal.com/videos/multisites-vs-multiple-sites

I can't say that I understand the whole thing since I haven't studied it and tried it yet, but I think I can figure it out when the time comes, and, if I can, most anyone can.

Hope it helps.

gpk’s picture

>To update or upgrade you will have to put all 200 sites offline at same time and update each one by one
It depends how you "do" multisite. I would probably leave the old sites extant and do the upgrade in a new folder, and then modify Apache VirtualHost/Directory directives to flip the domain over to the new version of the site. Actually with 200 to do I'd probably write a script to handle this. There was a post about this yesterday and someone suggested drush ("Drupal shell") module (lets you do some Drupal stuff from the command line) might help with this.

gpk
----
www.alexoria.co.uk

OliverColeman’s picture

We give each site its own web root (/home/user/public_html) that has symlinks to the drupal code base except for the following folders/files:
- sites
- sites/default/*
- .htaccess (for some sites)
We also make sites/all a symlink to a global code base of modules and themes.
To do some multi-site stuff we have links from the sites dir in the code base back to the individual sites.

We use scripts to create new sites (sets up the file system (symlinks and directories) and populates the DB), and update from one code base to another.

We're starting to use drush but I haven't had much to do with this personally so far so can't report much!

ghankstef’s picture

I prefer multi-site as it makes the updating process a bit easier as well as management of sites in general.

I run updates via Drush - a command line php script. Updating the database is a simple is running 'drush updatedb'

Yes you need to do this for each site but if you can do shell scripting it is possible to make a script to do them all at once.

I use multisite for 4-5 Drupal sites in an couple of places. Haven't something to the scal of 200 though.

naught101’s picture

That's basically what we do too. We're finding that it's not so easy on a larger install base (~50 sites), because it's hard to keep track of which sites are using which modules, and that can be painful when upgrading, if something breaks. That said, doing it all separately isn't much better - just easier for testing.