Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I needed to update drush to 7.x in order to use with drupal 8. Drush is now on github and directions to update have changed some.
1. Create a github account (if you don't already have one)
2. Add your ssh key to github profile
3. Go to home>drush folder and remove all contents including hidden files
4. cd ~/drush
5. git clone git@github.com:drush-ops/drush.git .
6. drush cc drush
You can check the version with
drush version
Thanks Mike for your help in irc!
Comments
Comment #1
mike stewart CreditAttribution: mike stewart commentedOk, I looked at this post, and think the following is easier and slightly more correct:
Open a terminal, (F4 key) or CTRL-ALT-T, and then type (think you can cut & paste -- but no time to test at the moment):
You've now cloned, and are on the latest commit of drush. It is compatible with Drupal8, and this might be all you need. The rest is optional / informational.
Also note, as of this writing there is a bit of a bug with drush dl ... I think clearing drush (not drupal) cache will fix (in a terminal run this:
rm -rf ~/.drush/cache
). Also, using an altered ~/.drush/d7.make makefile is also a (temporary) solution.Comment #2
C13L0 CreditAttribution: C13L0 commentedThanks so much! I haven't tested this method but will try to spin up a new vm in a few days and give it a go.
Comment #3
niccolox CreditAttribution: niccolox commentedsorry to say I get errors on this
its a clean Drupalpro image
Comment #4
niccolox CreditAttribution: niccolox commentedI worked around it by doing git clone of latest d8 into another folder, copying across and have install Drupal 8 :>
haven't tried Drush yet
Comment #5
niccolox CreditAttribution: niccolox commentedDrush works fine, using head
note, there seems to be permissions problems in general after updating Drush with above method
Comment #6
patoshi CreditAttribution: patoshi commentedusing a fresh vm of drupalpro and i just did a "git pull" in the directory: ~/drush and then did a git checkout 7.x-5.9 ---- and thats it.
Comment #7
sirtetI got from Drush 5.8 to 8.0.0-rc3 like this:
First i copy-pasted the first block of commands in comment #1.
After that i tried
drush version
, which brought an error:Next i did
composer install
And there i was.
Thanks Mike.
Comment #8
sirtetI could now also upgrade to 8.0.1 the same way.
8.0.2 did not work, it needs PHP 5.5.9.
i am on 5.4.45, As going to 5.5 breaks things in my drupalpro VM...