Installing Drupal 8

Chapter 3 of the Drupal 8 User Guide covers server requirements, additional tools, preparing for installation, and running the installation script. Chapter 4 covers the next steps that should be done after the installation script has completed.

This page provides a shorter summary, along with links to more information and some alternatives used mostly by developers.

Before following the steps here, you should have an "AMP stack" set up: Apache (or another web server), MySQL (or other database server), and PHP. Usually, you only have to worry about this if you are running the site on your own computer. See the Drupal 8 User Guide (Section 3.1) and Local server setup in the Develop for Drupal guide for more information.

Overview

The basic steps to install Drupal, whether on your own laptop or a public web server, are as follows.

  1. Get the code
  2. Create a database
  3. Install code dependencies with composer
  4. Configure your installation
  5. Run the installer

Get the code

The Download page gives a link to the page for the current release. There are detailed instructions, with screenshots, in the Drupal 8 User Guide (Section 3.3).

You can also download Drupal with some of the tools described in Section 3.2 of the User Guide.

Developers and contributors: to keep up with the "bleeding edge" of development, or to contribute to development, you should download Drupal using git. There is an entire section of documentation for using git with Drupal, but you can find the basic instructions by visiting the project page for Drupal and opening the Version control tab. Note: if you install Drupal with git, then see the section "Install code dependencies with composer" below.

Another way to stay with the most recent version is to install Drupal using Composer. See the page Using Composer to manage Drupal site dependencies in the "Develop for Drupal" guide.

Create a database

The instructions in the Installing Drupal 7 guide still apply. In fact, that page has some notes on the (minor) differences between Drupal 7 and Drupal 8.

Install code dependencies with composer

This step is needed only if you have installed (or updated) the codebase using git.

In order to get a working codebase, you need to run composer install from the top level of the repository. This will install Symfony and other packages required by Drupal in the vendor/ directory.

If you skip this step, then you are likely to see an error message like this when you try to run the installer:

Warning: require(.../drupal/vendor/autoload.php): failed to open stream: No such file or directory in .../drupal/autoload.php on line 14

For more information, see the "Using Composer" section of the Develop for Drupal guide.

Configure your installation

If you are installing Drupal on your own computer, you will have to set up the web server (apache or other) to serve the site using PHP. You cannot just open the files in your web browser. If you are not familiar with configuring apache, then the comments on Configuring Apache Virtual Hosts and Installing Drupal and the linked tutorial may help.

You can run more than one site from a single codebase. See Multisite Drupal if you want to do this.

Run the installer

Visit your site in a web browser. You should be redirected to the installer page at /core/install.php. There is a detailed walk-through, with screenshots, in the Drupal 8 User Guide (Section 3.4).

Before installation

Before making your website publicly available on the Internet, you probably will want to build and test it in an offline environment.

Guide maintainers