Downloading and Installing Drupal 8 with Drupal Console

February 15, 2016

The Drupal Console project offers several methods for downloading and installing Drupal 8. This guide outlines the different approaches available.

Download

1) Using Interactive Mode

[gist-embed data-gist-id="c9b5db50a5654978b936" data-gist-file="site-new.sh" data-gist-hide-line-numbers="true" data-gist-show-loading="false"]

Drupal site new

2) Supplying Arguments Inline

[gist-embed data-gist-id="c9b5db50a5654978b936" data-gist-file="site-new-inline.sh" data-gist-hide-line-numbers="true" data-gist-show-loading="false"]

Drupal site new inline

Install

1) Using Interactive Mode

[gist-embed data-gist-id="c9b5db50a5654978b936" data-gist-file="site-install.sh" data-gist-hide-line-numbers="true" data-gist-show-loading="false"]

Drupal site install

2) Supplying Arguments Inline

[gist-embed data-gist-id="c9b5db50a5654978b936" data-gist-file="site-install-inline.sh" data-gist-hide-line-numbers="true" data-gist-show-loading="false"]

Drupal site install inline

Download and Install in a Single Command

1) Copy the configuration files, including sample YAML files, to your system.

[gist-embed data-gist-id="c9b5db50a5654978b936" data-gist-file="init.sh" data-gist-hide-line-numbers="true" data-gist-show-loading="false"]

drupal init

2) Customize the provided sample file.

Using your preferred text editor or IDE, open and modify the ~/.console/chain/quick-start-mysql.yml file. Ensure your database credentials are set correctly.

[gist-embed data-gist-id="c9b5db50a5654978b936" data-gist-file="quick-start-mysql.yml" data-gist-hide-line-numbers="true" data-gist-show-loading="false"]

3) Execute the chain command.

[gist-embed data-gist-id="c9b5db50a5654978b936" data-gist-file="chain-mysql.sh" data-gist-hide-line-numbers="true" data-gist-show-loading="false"]

The above configuration executes a sequence of commands to download and install Drupal with MySQL, then launches PHP's built-in web server. To view the site, open a browser and navigate to 127.0.0.1:8088.

Drupal chain

NOTE: To test Drupal 8 with SQLite and bypass MySQL configuration, you can use the following command.

[gist-embed data-gist-id="c9b5db50a5654978b936" data-gist-file="chain-sqlite.sh" data-gist-hide-line-numbers="true" data-gist-show-loading="false"]

This command uses the provided chain file located at ~/.console/chain/quick-start.yml.

[gist-embed data-gist-id="c9b5db50a5654978b936" data-gist-file="quick-start.yml" data-gist-hide-line-numbers="true" data-gist-show-loading="false"]

This method is useful for quickly setting up Drupal 8 for development sprints, demonstrations, or training sessions.

For more information about this feature, see the project documentation page How to download, install and serve Drupal 8

For instructions on installing Drupal Console itself, refer to the guide How to install Drupal Console.