Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

What Version of Drush Works with Drupal 8?

Parent Feed: 

UPDATED 25 November 2015: Drupal 8.0.0 and Drush 8.0.0 stable have been released!  Drush 8 works with Drupal 6, 7 and 8, and is the recommended version to use regardless of which version of Drupal you are using. See the Drush Installation Instructions for the latest information on supported Drupal versions for each Drush version.

The post below was written prior to the release of Drush 7.0.0. The information below is still more or less correct, although newer releases are now available.

For quite a while now, it has been common knowledge that stable versions of Drush do not support Drupal 8.  The reason for this is quite simple, when you think about it. Drupal 8 itself does not have a stable release yet. At this stage in its development, changes to Drupal core that break backwards compatibility—in particular, backwards compatibility with existing versions of Drush—are common.

Because Drupal 8 isn't yet stable, it would not be very meaningful to claim that a stable Drush release supported Drupal 8. It would only be a matter of time before that claim became untrue.  The solution, then, is obvious enough; when you want to use the development (unstable) branch of Drupal, you must also use the development branch of Drush.

Development on Drush happens on the master branch of Drush’s GitHub repository; currently, this development is working towards the Drush 7 release. The Drush 7 Release Planning issue on GitHub is tracking progress on this issue. You might want to follow along here, because things are going to change once a stable release of Drush 7 is available. A summary of what is going to happen vis-a-vis the GitHub branch used for Drush development is visually represented in the table below:

 

Right Now

Soon!

 

Development

Branch

Drupal

Support

Development

Branch

Drupal

Support

Drush 6 Development

6.x

7 + 6

Phase out

7 + 6

Drush 7 Development

master

8 + 7 + 6

7.x

7 + 6

Drush 8 Development

Does not exist!

master

8 + 7 + 6

So, clearly enough, the Drush master branch will continue to be the place to get the version of Drush that supports Drupal 8. After the Drush 7 stable release comes out, folks are likely going to start calling the master branch “Drush 8.” This might cause some confusion for those who have it set in their heads that you need to use “Drush 7” with Drupal 8.  If you keep using the dev-master branch with composer install, though, then there will not be any trouble at all. Just keep using the development branch of Drush, and it will continue to work with Drupal 8.  Instructions on how to use the Drush dev-master branch via Composer are available in the Drush installation documentation.

The Drush 7 branch will not necessarily be created immediately upon release of Drush 7.0.0.  For a time, Drush 7 development will continue to happen on the master branch; it won’t be until an incompatible change is made to master that the 7.x branch will come into being. What that happens will depend entirely on the development needs of Drush. Similarly, the Drush 6 branch is not going to fall into disuse immediately upon the creation of the 7.x branch.  Usually, when a new development branch is introduced for Drush, the maintainers will backport the most important bugs fixes made in the master branch to both the stable branch (soon to be 7.x) and the branch before that (which is to say, 6.x). This process falls off quickly over time, though, so it’s always a good idea to upgrade to the latest stable branch as soon as possible.

Hopefully this information will clear things up as we head into the final stages of Drush 7 stable release planning. As always, we’re happy for any help that we can get, so stop by the Drush issue queue, and help Drush 7 be the best release it can be.

Topics Development, Drupal Planet, Drupal
Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web