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

Digital Public Goods Alliance Strategy 2021–2026

Boosting Digital Infrastructure with Digital Public Goods

The United Nations (UN) defines a roadmap for Digital Public Goods (DPGs) as open-source software, open data, open AI models, open standards, and open content.

Read More

Best Practices for Software Testing

Power of Software Testing: Why Software Teams Use It Effectively

In the modern digital era, where software is used in nearly every aspect of everyday life, the importance of software testing cannot be emphasized.

Read More

Benefits of Programmatic SEO Implementation

What It Is and How to Implement It How SEOs Make the Web Better

In the rapidly evolving field of SEO, staying ahead of the curve necessitates adopting new strategies and utilizing technology.

Read More

Unlocking the potential of SEO for boosting business

Branding With SEO: Boost brand Visibility, credibility, and Engagement With An SEO Strategy

Many people think that the primary function of search engine optimization is to garner organic traffic on a website; however, it is beyond that.

Read More