25

I usually download the latest Drupal 7 using drush dl drupal --select, but but Drupal 8 doesn't get listed.

What are some nice and quick ways of download the latest version of Drupal 8, even though it is still in alpha stage?

35
drush dl drupal-8

Since there are no stable releases of Drupal 8, you must use the --all option to see the tagged alpha releases:

drush dl drupal-8 --select --all

This also works.

drush dl drupal --default-major=8 --select --all

Both of these are now working in the current version of Drush, without the --all flag:

  • drush dl drupal-8 --select

  • drush dl --default-major=8 --select

Note that the Drush pm-* commands only work with one major version of Drupal at a time, and that version currently defaults to Drupal 7. Therefore, drush dl drupal only shows the various Drupal 7 releases available, and does not include any versions of Drupal 8. This much has not changed.

drush dl drupal-8 now works fine with the Drupal 8.0.0-rc1 release.

  • 3
    The version now currently defaults to Drupal 8. drush dl drupal-7 works for latest stable Drupal 7 release. – cdmo Sep 9 '16 at 12:28
4

Since drush dl has been deprecated in recent Drush 9, so you need to use Composer in order to download Drupal 8 sources from the command line. E.g.

composer require drupal/drupal

Prefix with sudo to override the permissons (not recommended).

If you're in /var/www/html directory and you want to place your Drupal 8 sources there, you can run the following commands:

cd /var/www/html
sudo composer create-project drupal-composer/drupal-project:8.x-dev --no-interaction .
sudo ln -vs web/.* web/* .

Read about differences between drupal/drupal and drupal-composer/drupal-project here.


Alternatively download Drupal sources and extract them manually via:

curl -s https://ftp.drupal.org/files/projects/drupal-8.2.7.tar.gz | tar --strip-components=1 -zxvf -

Notes: Change the version to the latest one. Prefix tar with sudo if required.

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.