A little of everything professional. This site contains the largest online collection of electronic signature laws and research, my views on Time Management & GTD life hacks for improving productivity, and my After Thoughts on bad decisions and business improvements. Personal thoughts and casual comments are pushed to my SEO project, The World's Greatest Guy.
Installing a multi-site system on Drupal in less than 10 minutes
Someone had posted a comment on my Setting Up Drupal in 10 minutes. This is the response to that reader's questions.
Hi Isaac,
Great job with the install post! I can't wait for the Testing, Site Structure and Creating Content episodes. You had mentioned previously that you had setup two installs running a total of 10 sites. The multi-site funcionalty sounds amazing! Can you walk me through how you implemented those multi-func setups?
Dear reader,
I am glad to see that you liked the guide on installing Druapl and yes I really need to finish the rest of it soon.
Here is how I installed and continue to run multiple websites on the same code base of Drupal. This makes Drupal the King of CMS sites if you ask me, due to the easy maintenance of using the same code base.
STEP ONE:
Under my "Initial Setup" you will notice that the "default folder" in the 'sites' dir will be the default location for the settings.php of a single-site install (you can rename it as I had suggested) IF YOU WANT A MULTI-SITE... then simply create new directories in the /drupal/sites/xxxx. For example:
If you have three domains for 3 sites
- www.example-1.com
- www.example-2.com
- www.example-2.com/site3
Then the directories would look like this (with a unique settings.php in each folder):
-
/drupal/sites/example-1.com
/drupal/sites/example-2.com
/drupal/sites/example-2.com/site3
STEP TWO:
Of' course you will still need to point the DNS for each domain name to the ROOT DRUPAL folder and NOT /drupal/sites/xxxx - Drupal automatically directs the individual request to drupal/sites/example.com
NEXT:
The remaining steps are the same as a single install. Note that if you are limited on the number of DB then you can run multiple sites from just one DB. Simply load the new DB files with a n_ appended to each table (with "n" being the designation for your multi-site) and then use that n_ name for your settings.php file.
RobotsTxt - is a must have module for multi-site installs of Drupal. It allows you to edit your robots txt file from the Drupal Admin panel and not affect the robotstxt of the other sites. This is a have to item if you have multiple sites all running on one Drupal code base
Comments
Well done!
Issac,
You have outdone yourself again.
Can you recommend any drupal-friendly hosts that offer unlimited domains and unlimited - or at least 5-10 mySQL Db's?
tia,
x
Drupal Hosts
I would suggest using Godaddy or 1and1. Both are well established hosters that can easily handle Drupal.
if you can install drupal yourself...
I'd use bluehost.
It's only 7 dollars a month to get 750g of transfer, 30g space, 50 mysql dbs and they have the mod_rewrite goin' on for the clean urls (which is a pain in the butt to configure, for me anyway).
They offer more, but for drupal that's the goods right there.
I've also had good luck with dreamhost, but it was before I tried drupal and can't vouch for their drup-nicity.
I wish I had guides like these a year ago :-)
Your 10 minute install guides are great, Isaac. They would have been nice to have when I started using Drupal... Good work.
I just posted a guide for a more secure Drupal multisite install, and I'd be interested your thoughts.
Development vs production
We run a staged server environment where I am contracting.
What kind of changes would I need to make to the build out structure to go from development to production for each of the sites?
Development:
/drupal/sites/dev.example-1.com
/drupal/sites/dev.example-2.com
/drupal/sites/dev.example-3.com
Production:
/drupal/sites/example-1.com
/drupal/sites/example-2.com
/drupal/sites/example-3.com
Number of ways
sorry for the delay its been a busy new year. There are a number of ways to flip from dev to production but it would depend on where the changes are made.
If its a small change then I would just copy the files from dev to pro.
If its larger scale then typically what I did was work on the dev folder until it was finished and then copy it to a new dir. Then I would redirect the DNS to the new dir and eventually kill the old production folder.
Post new comment