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)

Installing the first host


With the Drupal source code in the document root and the databases created in MySQL, we are ready to install our first site. There are two parts to installing Drupal. The first is done through the operating system, and involves creating a few directories and a file.

If you are manually installing, you will need to copy the settings file and then create a files directory with the correct permissions.

If you are using the Vagrant installation discussed in the last chapter then you do not need to do either of these things. Vagrant does them for you.

Telling Drupal about our sites

Drupal stores most of its data inside of the database. But some things can (or must) be stored in a file on the filesystem. For example, information about connecting to the database must be stored in a file.

Here is where things get interesting for a multi-site installation. Each of our sites will share the same copy of Drupal. But they will not share the same database. Each will have its own...