7

Starting to play around with drupal 8. My first method of installing was installing drush8 (as mentioned in https://www.drupal.org/documentation/install/download):

Get drush8:

composer require drush/drush:dev-master

and then

drush dl drupal
mv drupal-8.0.1/* .
mv drupal-8.0.1/.* .
rmdir drupal-8.0.1

Then I later read that instead of installing via drush I can install via composer (Using Composer in a Drupal project). The earlier drupal instructions that I read above had no mention of this installation method.

composer create-project drupal/drupal my_site_name 8.0.*` 

I also found a slightly different variation (Composer in relation to Drush Make):

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

Which I understand creates a slightly different directory structure (according to this article it also creates a 'web' sub directory).

There's also the Drupal Console method:

drupal site:new my_site_name

Other than personal preference, is there a good or valid technical reason to use one method over another?

  • 2
    I think it was just phrasing, pros and cons lists don't really suit Q+A very well but there are often ways to focus the question so it fits a bit better. I've tried to do that, hopefully I haven't taken away the original intent of your question. Also hopefully it won't end up getting too broad, I think if we can find a succinct answer to this question it could help a lot of people in the future – Clive Dec 27 '15 at 14:02
  • You should not that the drupal-composer project isn't official. – Eyal Dec 28 '15 at 1:29
  • 1
    Another option is to use git. git clone --branch 8.0.x git.drupal.org/project/drupal.git my_site_name – Eyal Dec 29 '15 at 21:45
  • @Eyal: good point I was going to mention that too. Although composer create-project appears to also do a git clone. There is a .git subdirectory in my drupal site which I created via the composer create-project drupal/drupal my_site_name 8.0.* method – User Dec 29 '15 at 21:53
1

First of all, you are describing methods to download drupal, not install. If you use drush dl or drupal site:new my_site_name, this is the same as downloading the tar ball and extracting it. If you want to install drupal, you use drush si or drupal site:install, where you can provide the details for installation like database connection on the command line instead in the standard web installer.

To describe the different download methods, as mentioned drush dl and console site:new are only a shortcut for downloading the tar ball. On the other hand, if you use composer, you don't load the tar ball, but use composer to load each of the components, that are in drupal. If you plan to use only the drupal releases and want to follow the normal upgrade path, you don't need to do this. If you want to use dev versions and want to update without the need to download the whole project, use composer. Probably in combination with git for a complete dev workflow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.