Book Image

Drupal 7 Multi Sites Configuration

Book Image

Drupal 7 Multi Sites Configuration

Overview of this book

Drupal is one of the most powerful PHP Content Management Systems there is. However, why would you install a CMS for every site you build? With just one copy of Drupal you can host several sites. Drupal has long had multi-site support, and Drupal 7's support is even better than previous versions. Drupal 7 Multi-Sites Configuration will teach you how to host several websites on a single copy of Drupal. You will learn how to create different sites, each with its own domain, content, and theme. This valuable information will help you to save time by managing modules and sharing them across several sites as well as administering your sites all in one place.This book will show you how to configure a system for multi-site, and then install several sites on one copy of Drupal, all with their own domain name and database. Learn how to install and share modules and themes, configure Apache, PHP, and MySQL for multi-site, and then manage the site. Once your site system is successfully set up, discover some of the advanced configurations possible with Drupal multi-site, as well as how to upgrade and maintain your sites.
Table of Contents (11 chapters)

Drupal is a multi-site Content Management System


Drupal is a web-based Content Management System (CMS) . Its purpose is to provide a flexible and powerful system for building a wide variety of websites. To that end, it not only has a flexible content management core, but also provides a modular system in which add-on modules can hook into just about any piece of Drupal. With over seven thousand modules available, Drupal has become a choice tool for constructing robust and feature-rich websites.

It should be evident already that Drupal can do many things. This book is focused on one of those things. A single instance of Drupal can be used to run more than one website. This means you can install the Drupal software once and have it drive more than one website. This feature is called multi-site hosting. Over the course of this book, we will learn how to install, configure, and manage a multi-site Drupal instance.

This first chapter covers the basics of running multiple sites. It is conceptually divided into two sections: The first is focused on what multi-site hosting is all about, and the second is on how we can start building a multi-site capable server.

In the first part we look at several common ways of building a multi-site—some of which are Drupal-specific, and some of which are not. By the end of this section you will be familiar with the problems that are solved by multi-site installations, as well as what options there are for hosting multiple sites on a single server.

While there are several ways to host multiple sites on the server, this book is focused only on one particular method: Using Drupal's built-in multi-site capabilities to host several sites on one copy of Drupal's code. After reading about other methods, you may discover that one of those suits you better, and where possible I have inserted references detailing those other methods. But for those who see Drupal's multi-site capability as meeting their needs, the remainder of this chapter (and the rest of the book) walks through the process of setting up such a platform.

In the second part of the chapter we will configure a local testing environment. It is not necessary that you run an environment identical to this, but by using Virtual Box and Vagrant to set up a standard virtual machine, this book will create an environment that you should be able to replicate should you so desire. (We will learn more about VirtualBox, as well as manual configuration, later in this chapter.)

To get started, let's look at the relationship between a website and the server that runs it.