Khanh Hoang - Kenn
Kenn is a user experience designer and front end developer who enjoys creating beautiful and usable web and mobile experiences.
Do you have more than a few installations of Drupal 7 on a server? Tired of doggedly updating the core files when they're released? Add to the mix updating the installs of modules on numerous sites. After you've gone down that road a several times you start to wonder if there is a better way to handle updates/upgrades of modules and Drupal's core files.
THE ANSWER IS A DRUPAL MULTISITE
A Drupal multisite allows multiple domains to share the same Drupal core files. That's right, one install of Drupal and as many domains as you want use the same core files. Even better is that all of those other domains can do the same thing with the modules. Imagine updating a module once and your done (of course it is always a good idea to run update.php for each domain, but you'd be doing that anyway.)
Is Your Current Hosting Company Drupal Friendly?
Before you start it's a good idea to make certain that your current hosting company is Drupal friendly. The best way is to read Drupal's requirements for the CMS. If you are looking for a hosting company consider Green Geeks (yeah, I get a commission if you use the link and sign up for an account).
Currently few web hosting companies are offering PHP 5.3, which is the version most ideal for Drupal 7. Check your CPanel to see which version of PHP is installed. If it is below PHP 5, then you need to seriously considering moving to a new service.
[In some cases the reason hosting companies are slow (read that as reluctant) to upgrade to a newer version is because they feel too many customers will rise and revolt when they discover their old PHP code no longer works. Running a version of PHP below 5 not only prevents you from enjoying a better operating program, it also increases security issues.]
If you sign up for a new account with GreenGeeks and you get a plan with a 'free domain' don't use one that you plan to develop. Instead sign up for one that you won't mind losing. Here's why. The free domain is in complete control of Green Geeks. Lots of luck transferring it to another hosting service--not saying it isn't possible--just you're better off choosing a domain you can scrap.
There's another reason for selecting a useless domain name. The domain you select will become the primary name for the account. It will also be the domain where the core Drupal 7 files will be installed. The final reason for a junk name is that I'd hate to see anyone poor years of hard work into a site, then decide to sell the domain. Don't complicate your already hectic life.
Setting Up Your Primary Drupal 7 Site
On some servers I've used services like Fantastico to install WordPress and Drupal without a problem. For whatever reason When I used Fantastico on GreenGreeks the results were not as expected. Sure for a single install of Drupal the site works, but when building the multisites things got wonky. For example on a multisite the URI would look something like this, "http://www.example.com/example."
Not willing to spend a massive amount of time on diagnosing the problem I found a system that works and isn't difficult...if you follow the steps in order.
Installing the Primary Drupal Account
You'll need to download the latest version of Drupal 7. Don't be tempted to get the DEV(eloper) version. It's not the official release and most likely has a chance of doing unexpected things. In other words never-ever use a development version for a production site.
If you were expecting a ZIP file you're probably surprised to find it wrapped in a tar-ball. No need to stress, you're not going to open it on your machine.
Get Your Drupal Multisite Domain Name Ready for Action
Assuming that you already have a domain registry you'll need to log in and change the DNS for the Drupal multisite domain. The specific DNS settings should have been emailed to you when you registered for Green Geeks hosting. If you aren't certain how to change the DNS settings do a quick search on Google using the name of the registry service (like GoDaddy) plus 'change DNS'. If all else fails contact technical support. Be forewarned. It can take up to 48 hours before the DNS change takes place. In other words it take minutes or days before your domain name will point to the new hosting company.
You won't have to wait though to perform the following steps. You will however have to wait for the Internet to recognize your new hosting company before installing a multisite.
Creating the Drupal Multisites
You'll be repeating much of what you did in the previous section, but the scenery will be slightly different. Namely, you'll be doing a few extra steps using your computer.
Before getting started you'll need to expand the Drupal tar-ball. If the file type looks unfamiliar to you may need to download Z-Zip to free up that little tar-ball. If this is your first time you'll be surprised that you don't 'unzip' it once, but twice. After the second 'unzip' you'll a folder named Drupal 7.x.
Semi-Final Steps for a Happier Drupal Multisite Life
You're on your final leg of the journey. In a few moments you'll officially be running a Drupal multisite.
If you're going to be installing only one multisite, then you can delete the ZIP file you created earlier. If you plan to create any additional multisite in the immediate future, then delete the zipped you created and rename the folder you zipped previously to that of the next domain you'll be installing. Might as well ZIP it too.
A word of caution about adding multisites in the future. You'll want to be certain that the version of Drupal installed on the primary account is the same version that you are adding as a multisite. Otherwise you'll run into problems in regards to the database.
Final Steps to Complete Installation of Drupal Multisite
This final part is mainly housekeeping and tossing the files no longer needed.
The Finishing Touches On Your Drupal Multisite
To keep your Drupal 7 site healthy it is an excellent idea to run what is called a cron job. In the past this is something that sent people an early digital grave. Relatively few web site owners bother with it because it seems so arcane.
The good news is that Drupal 7 comes to the rescue, but because this is a multisite you need to perform one little tweak, which won't be technical...I promise.
Remember back when you created an empty folder with the name of your domain? Recall the empty folder you added called 'tmp'? You're about to find out why you added it. Before we get started log into your new multisite.
By the way this site is hosted on Green Geeks.