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)

Preface

Drupal is a flexible Content Management System (CMS). One important feature that it provides is its ability to run multiple websites from one single installation of the Drupal software. This book is about that specific feature. From installation to configuration, then to maintenance and updating, this book focuses on the nuances of what is called "multi-site" Drupal.

The book takes a practical hands-on approach, showing, by example, how to run several sites, each with its own theme, content, and users.

What this book covers

Chapter 1, Multi-site Drupal, introduces the broad concept of multi-site, discussing several ways that servers can be configured to run multiple sites. The first half of the chapter focuses on determining which sort of multi-site configuration is best for your needs. The second half focuses on setting up a server environment.

Chapter 2, Installing Drupal for Multi-site, covers the process of installing Drupal once, and then configuring several sites to all run on this one Drupal instance. Multi-site configuration can be tricky, but we will methodically walk through the process.

Chapter 3, Settings, Modules, and Themes, focuses on adding features to multi-sites. Sometimes features (provided by Drupal modules) are shared across sites, while other times only one of the sites will have a particular feature. We will discuss how this can be achieved. We also look at installing and configuring themes so that each site can have its own distinct look and feel.

Chapter 4, Updating Multi-site Drupal, focuses on maintenance tasks. When running multiple sites on a single installation, it can sometimes be tricky to run software updates. This chapter teaches you how to navigate the pitfalls of multi-site configurations in order to keep your site secure, safe, and stable.

Chapter 5, Advanced Multi-sites, covers several advanced topics. We will look at ways to enhance multi-site capabilities, and share limited data between sites. This survey of available add-on modules points multi-site managers to a trove of resources that can take your multi-site to the next level.

What you need for this book

This book assumes basic knowledge of installing and running Drupal. The reader should be comfortable working in a web browser and also have a rudimentary understanding of working from the command line. While this book uses examples from Linux and Mac operating systems, the concepts apply equally well to Windows environments.

Advanced readers will also have the option to work with VirtualBox and Vagrant to quickly experiment with multi-site on its own virtual server running within your normal desktop environment.

Who this book is for

This book is written with the site builder in mind. Those comfortable with running websites and familiar with Drupal will find this book useful. Optional advanced topics will provide experienced site builders with additional tools to broaden their Drupal and web administration knowledge.

As most Drupal installations run on Linux-like operating systems, the examples herein target that environment. However, Windows users will also be able to run the same installation on Windows.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "And thirdly, the vagrant up command tells vagrant to install, boot, and configure our server."

A block of code is set as follows:

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/
# Lots more below.

Any command-line input or output is written as follows:

$ cd sites/books.local
$ mkdir files
$ chown www-data files

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "You can carry out this same step in your web browser by going to http://drupal.org and going to the Download and Extend page".

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to, and mention the book title through the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Note

Use the #PacktDrupalMS hashtag on Twitter to discuss the book with the author, fellow readers, and Packt.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website, or added to any list of existing errata, under the Errata section of that title.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.