
Before we start looking at all of the great new features in Drupal 7 in detail, let's walk through the process for installing Drupal 7 and upgrading Drupal 6 sites to Drupal 7. Several aspects of the installation process have changed, including:
- A new installation option that installs commonly-used features by default
- A command-line installation process
- Better support for installation profiles
After we have looked at the installation process, we will move on to upgrading your Drupal 6 website to Drupal 7.
Drupal's installation process has always been very easy to use, and the Drupal 7 installation makes things even easier.
Before beginning to install Drupal 7, you will need a web server running the Apache HTTPD web server. You can also use IIS on Microsoft Windows, but the Apache server is preferred and you will be able to obtain support from the community more easily if you use the Apache server.
Tip
Want to easily install Apache onto a Microsoft Windows machine? Try XAMPP, which is published by Apache Friends. This package includes Apache, MySQL, and PHP with a standard Microsoft Windows installer. You can download XAMPP from http://www.apachefriends.org/en/xampp.html. Other options include WAMP (http://www.wampserver.com/en/) and MoWeS Portable
(http://www.chsoftware.net/en/mowes/mowesportable/mowes.htm)
Your server will also need PHP installed on it. Drupal requires at least PHP version 5.2.0. As of this writing, there are some hosts that still do not have PHP 5.2.0 or later installed on their shared hosting accounts, and Red Hat does not include PHP 5.2.0 or later in its default distribution. Check with your host or system administrator before installing Drupal to make sure that the correct version is available.
In addition to the web server and PHP, you will also need a database. MySQL and PostgreSQL are the databases that are most frequently used with Drupal, and of the two, MySQL is much more widely used. That being said, you can use Drupal with many different databases and the new DBTNG database abstraction layer will make it easier to deploy to any database. If you are using MySQL, you will need version 5.0.15 or later installed. If you are using PostgreSQL, you will need PostgreSQL 8.3.0 or later. SQLite is also officially supported for use with Drupal and you will need version 3.4.2 or later.
After you have a server set up with the proper software, you can download Drupal and begin the installation process.
If you have used previous versions of Drupal, the process for downloading Drupal is the same as always. If you are new to Drupal, you will use the following process:
- Go to the Drupal project page on Drupal.org: http://drupal.org/project/drupal.
- Find the latest official release of Drupal 7 and click on the Download link. The release will be named 7.0 or similar.
- Your browser will ask whether you want to download or Open the file. Make sure to download it to your computer.
- The file you downloaded is a
.tar.gz
file, which is a compressed archive similar to a.zip
file. You will need to extract the files from this archive onto your computer.Tip
If your computer doesn't already have a program that can open
.tar.gz
files, try 7-Zip, an open source application that easily handles these files. You can download 7-Zip from http://www.7-zip.org. - After you have extracted the files, you will need to copy them to your web server's document root.
- You are now ready to start the installation process. Simply navigate to http://yoursite.com/install.php.
Let's step through the installation process in detail now.
The first step in the installation process is selecting an installation profile. Drupal prompts you with a screen asking for which installation profile you want to use during the installation:

By default, Drupal comes with two installation profiles, the Standard profile and the Minimal profile. Custom distributions may come with additional profiles. We will discuss creating custom installation profiles at the end of this chapter.
The Minimal profile installs a basic configuration of Drupal with only the required functionality enabled. This profile is even more minimal than the base Drupal 6 installation.
This profile should be used if you are very familiar with setting up Drupal and don't want some of the additional features activated in the Standard profile.
The Standard Drupal profile installs and activates several commonly-used features to make your Drupal site more useful immediately. These additional features include:
- Search form installed on the left sidebar.
- Powered by Drupal block enabled in the footer.
- A basic page content type is automatically created to store static content on your site.
- An article content type is automatically created to store time-specific content. The article content type replaces the story content type from Drupal 6.
- Both content types are set up with RDF capabilities.
- User profiles have pictures enabled by default. Profile pictures can have a maximum size of 1024x1024 pixels and be up to 800 KB when they are uploaded. They will be displayed using the thumbnail image style.
- A taxonomy called Tags is created to allow easy categorization of content on your site.
- The article content type is enhanced by adding an image field, which allows PNG, GIF, and JPG files to be attached to the article.
- An administrator role is created that has all permissions activated for it. As new modules are activated, the administrator role will automatically be updated with the permissions for the new module.
- The Seven theme is activated for the administration section of the site.
In most cases, you will want to start with the Standard installation profile, especially if you are setting up an entirely new site or if you are new to Drupal.
The next step in the installation is choosing the language with which you want to install Drupal. By default, Drupal only includes an English installer. If you want to want to install Drupal in another language, you will need to download a translation from Drupal.org. A complete list of translations is available at http://drupal.org/project/translations. After you download the translation you want to use, you will need to unpack the translation and copy it to your document folder. The process to unpack and copy the files is similar to the process we used when we unpacked and copied the core Drupal files to your server.
Drupal will now check the requirements of your server to ensure that it meets the minimum requirements to run Drupal and to ensure that everything is ready for the installation to proceed.
The requirements check will appear similar to the following:

If Drupal does discover any problems, it will give you information about how to correct the problem. In our case, it looks like we forgot to set up our settings
file. The settings
file tells Drupal which database to connect to as well as the connection information. To create a settings
file, navigate to your document root and then navigate to the sites/default
folder. Copy the default.settings.php
file to settings.php
. You do not need to change any of the information within the file.
After you have corrected any problems, click on the proceed with the installation link. Drupal will re-evaluate the requirements and let you know if anything else needs to be changed.
This screen has been enhanced in Drupal 7 to provide much more information about your current server settings.
The next step in installing Drupal is configuring the database where Drupal will store the content and configuration information for your site. The functionality of this screen has also been enhanced in Drupal 7.

The key difference is that Drupal 7 will automatically check which types of databases are available to you based on your server setup. Then, it will only allow you to select a database which will work.
If you want to run Drupal using a different database server than your web server, you can use the ADVANCED OPTIONS link to configure the database server and port. You can also use ADVANCED OPTIONS if you are setting up multiple sites within a single database.
For a Standard installation, enter the name of your database as well as the username and password for the database. This functionality remains the same as in Drupal 6.
If you use phpMyAdmin to create your database, you will need to log in to phpMyAdmin and create a database. You can create a new database from the home page, which should appear similar to the following screenshot depending on the version of phpMyAdmin you are using:

You can create a new user for the database in the Privileges tab.
After you have entered your database settings, click on the Save and continue button. Drupal will now configure the database and set up your site.
As the installation proceeds, Drupal will display its progress.

The installation may take several minutes to complete.
The relevant sections in php.ini
to control memory and execution time are shown in the following screenshot:

After the Standard installation has completed, you will need to configure your site.
The basic configuration starts by asking you for the SITE INFORMATION and SITE MAINTENANCE ACCOUNT details. The site maintenance account has the ability to change all settings within the site. You should make sure that the Password is difficult to guess and that it is stored securely.

These options are identical to the Drupal 6 settings.
The next set of configuration options allow you to determine which country your site is located in as well as the Default time zone for the site:

The Default country setting is new to Drupal 7 and the Default time zone setting has been made easier to understand by adding the name of the time zone.
The final set of configuration options are related to updating your site:

These settings allow you to have Drupal automatically check if any updates are available for Drupal or any contributed modules you have installed. If there are any updates available, you can optionally have Drupal e-mail you so you don't have to constantly check for updates on your own. It is highly recommended that you activate both of these options.
Drupal 6 administrators may have noticed that there is no setting for clean URLs. By default, Drupal 7 will activate clean URLs if your site is capable of using them.
After you have entered the configuration options to your satisfaction, click on the Save and continue button to finalize your choices.
After all options have been saved to the database, you will be given a final status screen stating that the installation completed successfully.

Now that the installation is finished, we can finally navigate to our site by clicking on the Visit your new site link.
The default home page has also been changed from Drupal 6, as shown in the following screenshot:

The text on the front page has been modified to make it simpler to understand. The front page also contains different information if a user is not logged in.

This helps to ensure that unnecessary information is not displayed to site visitors.
Now that we have gone through the entire Standard installation, let's look at some of the more advanced things you can do with the Drupal installer.