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.

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

Drupal 9 Upgrade

The Roadmap to upgrade Drupal site to Drupal 9

Drupal is approaching with its next big evolution and the upcoming release that is none other than Drupal 9.

Read More

How to Choose Web Development Agencies

Points to check before choosing the right website development company

In today’s day and age, where the digital population is increasing exponentially, no credible business can or should refrain from having a strong and steady web presence.

Read More

Wordpress to Drupal

Should I plan to move my Wordpress Website into the Latest Drupal version?

If you're here, I assume you already have a website built on WordPress but you're not satisfied with it, or perhaps you're here to have a clear idea about why you should give a thought to migrating

Read More

Drupal 9 Easy Upgrade

Why is Drupal 9 going to be an easy upgrade compared to the previous major versions?

Lately, there has been a lot of buzz around the corner about Drupal 9. The Drupal community is launching Drupal 9, and as well as have plans for the EOL of Drupal 7 and Drupal 8 by 2021.

Read More