Setup Drupal 8 using Drupal composer create project

In this video we are going to install Drupal 8 with the help of the Drupal composer create project command, which will pull the codebase and structure for us and will lay our way for best practice Drupal 8 project setup.

We are going to be using the Acquia Dev desktop for a server and we are going to install Drupal, using the codebase we pull with the help of composer create-project. 

So first the GitHub repo of the drupal-composer project could be found here. There we could also find a quite good example on how to use it with Composer. Our version of it could look something like this:

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

It is good first to move to the folder, where you keep all your Drupal or web projects, in general, to keep it clean and tidy. 

Then execute the composer create-project like the example above and depending on your internet connection you could pop to the kitchen for a beer or a cup of tea. 

After it is done you would have a folder structure that looks something like this:

Drupal composer setup for Drupal 8

As you see - the actual Drupal 8 root folder is under /web. It means of course as you are setting up your Virtual hosts or as you are installing it with the help of Acquia Dev desktop - you would have to use that folder or create a symlink to that folder.

The biggest gain is that you could start using composer afterward for managing your Drupal modules. You could also save your configuration outside of the web folder for additional security points, plus it is ready to be committed to your Git repo and with slight improvements - ready to be deployed on your development environments.

Long live Drupal composer setup and if you liked the video, please don't forget to subscribe to Drupal Up's YouTube channel from here.

Meet the author

Nikolay is a Drupal PHP developer with more than 7 years of experience. Passion for teaching, passion for simplicity and effectiveness of the code are just some keywords that he cares about. See more ...
Drupal Up is a platform for learning Drupal ...

Drupal Dan promoting
The idea is though not just to be another platform with some boring videos but all the videos to be inspired by real-world problems. That means something that you will most probably need if you work with Drupal. We want you to be successful and we want to teach you everything we know about Drupal!
So watch the videos, try to follow and reproduce, ask questions and you will see you will be able to conquer this wonderful sea that Drupal 8 is.