How to download, install and serve Drupal 8

How to download, install and serve Drupal 8

The easiest way to try Drupal 8 in your local machine is by executing the chain command and pass the option --file=~/.console/chain/quick-start.yml as shown on the following example.

$ drupal chain --file=~/.console/chain/quick-start.yml

NOTE: You must execute drupal init before in order to copy the ~/.console/chain/quick-start.yml on your system.

The chain command helps you to automate command execution, allowing you to define an external YAML file containing the definition name, option and arguments of several commands and execute that list based on the sequence defined in the file.

The content of the provided ~/.console/chain/quick-start.yml file is:

  - command: site:new
      version: 8.0.2
  - command: site:install
        langcode: en
        db-type: sqlite
        db-file: sites/default/files/.ht.sqlite
        site-name: 'Drupal 8 Quick Start'
        account-name: admin
        account-pass: admin
        generate-inline: true
        profile: standard
  - command: server

The previous configuration will execute several commands, in this case commands that will download and install Drupal using SQLite, and finally start the PHP's built in server, now you only need to open your browser and point it to

You can duplicate or make changes on the provided YAML file, to add commands for download modules module:download, install modules module:install , import configurations config:import and restore your database database:restore or any other command provided by DrupalConsole or a custom command by your own module.