This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
oliverdavies.uk-old-sculpin/source/_posts/download-different-versions-drupal-drush.md

51 lines
2 KiB
Markdown
Raw Normal View History

2015-03-16 21:18:03 +00:00
---
title: Download Different Versions of Drupal with Drush
2018-06-02 10:58:39 +00:00
date: '2013-12-31'
2015-03-16 21:18:03 +00:00
description: How to download different versions of Drupal core using Drush.
slug: download-different-versions-drupal-drush
tags:
2015-06-14 02:27:41 +00:00
- drupal
- drupal-planet
- drush
2016-12-29 16:32:52 +00:00
use: [posts]
2015-03-16 21:18:03 +00:00
---
2015-06-18 00:52:29 +00:00
{% block excerpt %}
2015-03-16 21:18:03 +00:00
If you use [Drush](https://raw.github.com/drush-ops/drush/master/README.md "About Drush"), it's likely that you've used the `drush pm-download` (or `drush dl` for short) command to start a new project. This command downloads projects from Drupal.org, but if you don't specify a project or type "drush dl drupal", the command will download the current stable version of Drupal core. Currently, this will be Drupal 7 with that being the current stable version of core at the time of writing this post.
But what if you don't want Drupal 7?
2015-06-18 00:52:29 +00:00
{% endblock %}
2015-03-16 21:18:03 +00:00
2015-06-18 00:52:29 +00:00
{% block content %}
2015-03-16 21:18:03 +00:00
I still maintain a number of Drupal 6 sites and occassionally need to download Drupal 6 core as opposed to Drupal 7. I'm also experimenting with Drupal 8 so I need to download that as well.
By declarding the core version of Drupal, such as "drupal-6", Drush will download that instead.
2017-03-16 08:09:52 +00:00
```language-bash
$ drush dl drupal-6
```
2015-03-16 21:18:03 +00:00
This downloads the most recent stable version of Drupal 6. If you don't want that, you can add the --select and additionally the --all options to be presented with an entire list to chose from.
2017-03-16 08:09:52 +00:00
```language-bash
$ drush dl drupal-6 --select
$ drush dl drupal-6 --select --all
```
2015-03-16 21:18:03 +00:00
If you want the most recent development version, just type:
2017-03-16 08:09:52 +00:00
```language-bash
$ drush dl drupal-6.x
```
2015-03-16 21:18:03 +00:00
The same can be done for other core versions of Drupal, from Drupal 5 upwards.
2017-03-16 08:09:52 +00:00
```language-bash
# This will download Drupal 5
$ drush dl drupal-5
# This will download Drupal 8
$ drush dl drupal-8
```
2015-03-16 21:18:03 +00:00
2015-06-14 02:27:41 +00:00
For a full list of the available options, type "drush help pm-download" into a Terminal window or take a look at the entry on [drush.ws](http://drush.ws/#pm-download, "The entry for pm-download on drush.ws").
2015-06-18 00:52:29 +00:00
{% endblock %}