Setting Up a New Drupal Installation

To begin, use composer to download the default project profile.

Do a default install with Composer:

composer create-project drupal/recommended-project PROJECT_NAME --no-interaction

Do a modified install with Composer:

To make modifications to the composer.json file before installing, use this command:

composer create-project drupal/recommended-project PROJECT_NAME --no-interaction --no-install

From here, make any modifications to the composer.json that you want to include during install. Since using command-line utilities Drush and Drupal Console will be essential, this can be added to composer.json and included in the installation.

    "require": {
    },

and add two lines beneath the current content in the "require" section:

    "require": {
        "drupal/console":"~1.0",
        "drush/drush": "^10.1"
    },

Once the desired modifications have been made, return to the terminal, cd to the new project folder and:

composer install

This will download all the required Drupal 8 core files based on the information in the composer file.

Complete the install

The output instructions require one more step before install:

  * Remove the plugin that prints this message:
      composer remove drupal/core-project-message

Make sure to be inside the new project directory and issue the command:

cd PROJECT_NAME
composer remove drupal/core-project-message

Using command-line utilities

After install, if you haven't already used the instructions above, you'll want to include the very useful command-line utilities Drush and Drupal Console. They don't come with drupal/recommended-project. These tools provide powerful ways to speed up your development process.

Next Steps

Add new comment

The content of this field is kept private and will not be shown publicly.
Enter a comment.