Multiple Web sites made easy using Drupal multisite and the right start

Drupal: 

You want to build multiple Web sites. If the Web sites are very similar, perhaps franchises of one company, you use the Drupal Domain module to build many sites sharing the same basic structure. If the sites vary more than what you see in a franchise, you use the Drupal multisite option because the multisite option gives you immense flexibility. This page is about multisite for flexibility with efficiency.

You want to save time. Starting at the right point will save you time and work. You want to create sites 2aa.in, ka.tl, and kooinda.com. Which one do you build first? how do you make the second one easier? The third? Here are the secrets.

Life will be easier every day if you put a couple of extra hours up front. Instead of starting with your first site, register another domain and set that up. You can buy a domain name for US$2.99. grab one and start there. Perhaps examplea.net. Use it for your first Drupal Web site. Configure the bare minimum modules and options.This is your base Web site. 20 minutes for an experienced person. 2 hours for a beginner.

Now create a demonstration Web site. Perhaps exampleb.net. Create this site on top of examplea.net using Drupal multisite. 20 minutes for an experienced person. 1 hour for someone who has experience creating the base site and just has to learn add a second site using Drupal multisite. The following list includes some useful pages if you are multisiting for the first time.

Multisite is there to make your life easier when the sites share some attributes. The sites share some modules. The sites work on the same release of Drupal. The sites all fit in one Web hosting account or server. At this point with your base site and demonstration site working, you now know everything about multisite. You can add those other sites using the information you already know. Those other sites could be 20 minutes each to the appearance of a useful Web page.

Themes

For some reason a lot of Web site building starts with the selection of a theme. Modern themes are usually built on a base theme. Zen is the most popular base theme. Genesis is another example of a base theme. If you have many Web sites, too many for one Web hosting account, and some use Zen while others use Genesis, you could put all the sites with Zen based themes in one multisite and all the sites with Genesis based themes in another multisite. This approach rarely produces the best balance of workload but it does make life easier when you have to update one of the base themes.

Online activity

Online activity limits the number of Web sites you can host in one account or one server. If you have one site with a peak workload in America and another with a peak workload in Thailand then another with a peak in Europe, they might fit the one server and share resources evenly. If they also share some modules, multisite gives you the easiest way to place the Web sites on the one server.

What happens when you move a site?

This can be the painful part if you start the wrong way. You install site A then add B and C on top. You then have to move A to a different server because of the workload or the size of the data. A is the default site in the multisite and is difficult to move. Move C off to a different server then move B off to a different server and leave A where it is.

What if you had read this page first? A would not be the default site for the multisite. M would be the base site and A would be one of the add-on sites. Moving A to another server will be easier. By starting with your own site as the base of a multisite, you free up all the other sites for easy moving and reconfiguration. in the 2aa.in, ka.tl, and kooinda.com example, none of them are locked into the multisite in any way. All the sites are free to move.

What about that demonstration site?

When you are using multisite, you are placing common modules into sites/all/modules and common themes into sites/all/themes. What happens when you want to use new module or theme X? You can test those new modules and themes in the demonstration site. Assume your demonstration site is picturer.net. The multisite configuration for picturer.net will be in sites/picturer.net/. You can add your new module to sites/picturer.net/modules/ and your new themes to sites/picturer.net/themes/. Test. When a module or theme works cleanly and you decide to use it for other sites, you uninstall the module or theme in picturer.net, delete the module or them from sites/picturer.net/, then install the module or theme in sites/all/modules/ or sites/all/themes/.

A module or theme installed in one site of a multisite configuration will, at the worst, upset just one site. After extensive testing, it can be shared. Make sure you delete the module or theme completely first before adding it to sites/all because Drupal can become confused if the same code is in both the sites/all directory and one of the specific site directories.

What are the hidden problems?

None. Multisite is well thought out. Confusion sometimes starts with subdomains but that is usually a web server problem. test.example.com is a subdomain of example.com. Drupal looks first for the domain test.example.com then for example.com. Drupal multisite gives you the freedom to treat test.example.com as a subdomain or as a unique domain.

Your web server might have a different configuration and confuse the two domains. If you use cPanel or Webmin a similar management program, they can have different ways to define describe and define subdomains. Add-on domains is one term in common use. Parked domains is another. Read the 5 minute multisite using Cpanel to see the most common terminology.

Summary

Use Drupal multisite to reduce the workload for setting up compatible Web sites. Before you set up your first multisite site, set up your own base site to protect against locking in one of your customer's sites. Also create a throw away demonstration site to prove modules and themes work befor inflicting them on your customer's sites.