Install latest Drush 7 version
2013 15 Nov

How to install latest Drush 7 version? So you can use drush with the brand new Drupal 8.

By Sumeet Pareek

It is interesting how when you are trying to do something new in drupal you land up learning (and doing) other newer things!

At the code sprint in Drupal Camp Delhi 2013, I finally got myself started with Drupal 8. The first thing that I did after cloning drupal and moving to the 8.x branch was a

$ drush status

I expected to see something that said I was using Drupal 8.x-dev and of course some errors about no database found. But what I saw instead was the unexpected error below -

$ drush status
Drush 5.0-dev does not support Drupal . Use Drush 4 instead.

I asked around in the sprint room and thanks to the fellow Piyush, found that I need to upgrade to drush 7 in order to work with Drupal 8 (new thing learned #1). And the discovery about drush moving out of Drupal.org project infrastructure to github.com soon followed. Pretty cool news huh! (new thing learned #2).

Sidenote: I just created an issue at drush’s new home on github.com to request letting future ‘movers’ to Drupal 8 know that they need to get drush 7 over from github.com

The next thing I needed to do was upgrade my existing drush 5.x to drush 7.x, so I tried what I had used to upgrade drush from version 4 to 5 in the past

$ drush self-update

But nothing happened and I was still on version 5. So.. drush self update is not capable of taking your from version 5 to the latest version and to get to version 7 of drush (as of 15 November 2013) you actually have to install it directly from github (new thing learned #3)

I use ubuntu and I had originally installed drush with a

$ sudo apt-get install drush

which did everything for me and I was not sure where all the files were installed. I was keen to use the same location to install drush 7 alongside my existing drush 5 setup.

A quick

$ updatedb
$ locate drush | more
revealed many locations, two of which were important
/usr/bin/drush
/usr/share/drush/drush

It was clear that I needed to download and place latest drush files in my /usr/share directory and create a symlink to it in my /usr/bin directory, which the below commands did for me

$ cd /usr/share
$ sudo git clone https://github.com/drush-ops/drush.git drush7
$ sudo ln -sf /usr/share/drush7/drush /usr/bin/etc

And ah! - What a joy it was to move to the latest version of drush and Drupal :-) and I hope you make the move soon too.

$ drush --version
 Drush Version   :  7.0-dev

$ drush status
 Drupal version                  :  8.0-dev                                                                                  
 Site URI                        :  http://default                                                                           
 Database driver                 :  mysql

 

Latest Blogs

Security

Tips to Secure your Drupal Website with Ease: Basic Security checklist

If someone were to break in your room, they would probably learn less about you than if they hacked you on the internet.

Read More

intor_react

Introduction to React JS and Components

React is a flexible JavaScript library for building user interfaces and it lets you compose complex UIs from small and isolated pieces of codes which is known as Components.

Read More

Flexbox

How to simplify the layout of your website using Flexbox?

Have you ever scratched your head while working with CSS to make some simple layouts for your website? Are you fed up of running to the UI developers for small layout designs every time?

Read More

cache_context

Drupal 8 Cache Context: An efficient way for context based caching.

We are well aware of the fact that Drupal Cache API is a remarkable feature introduced in Drupal 8.

Read More