Installing a new Drupal 8 site with Composer

By Tim Erickson
Posted May 7, 2017
Image of Composer and Drupal 8

Gathering some notes here for future reference. 

I was confused, because there are two different templates for Drupal as outline on the Drupal.org page mentioned above, along with a composer command for each. 

Using drupal-composer/drupal-project - this command installs the latest stabile version of Drupal 8.
It will install into new directory with name of "my_site_name_dir"

composer create-project drupal-composer/drupal-project:8.x-dev my_site_name_dir --stability dev --no-interaction

Using drupal/drupal - this command installs the latest DEV version of Drupal 8.3 into "my_site_name_dir"
It will install into new directory with name of "my_site_name_dir"

composer create-project drupal/drupal my_site_name_dir 8.3.*@dev --no-dev

I was trying to using drupal/drupal, to install the latest stabile version of Drupal 8. This command works, but does not create a new directory. It will install into your current directory. 

composer create-project drupal/drupal:~8 d8.dev/