Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Drupal 8.x with Composer, example of step commands


Using Composer in a Drupal project Using Composer to install Drupal packages through


  1. Using
composer create-project drupal-composer/drupal-project:8.x-dev some-dir \ 
         --stability dev --no-interaction
  1. Through the official Composer Service
composer config repositories.drupal composer

composer create-project drupal/drupal /var/www/drupal-8.1.2 8.1.2

Install modules/themes etc

// Important: version (eg :8.x) needs to be added if there are multiple versions available on D.O. repos
composer require drupal/devel
composer require drupal/features:8.x
composer require drupal/token:8.0.x-dev
composer require drupal/restui drupal/jsonapi

Do not install the require-dev stuff (production installation)

composer install --no-dev

Update Drupal core

composer update drupal/core
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.