3

I installed Drush with composer global require drush/drush:dev-master but it has some problems. I am using Xampp and Windows 8.

How can I downgrade Drush from 8-dev to 7?

3 Answers 3

5

You can first uninstall (remove) the version you don't want anymore (8-dev) and then try install the version you want.

So, first run drush status; then look for drush script. You can see the directory Drush was installed on your computer; try remove it manually or with rmdir <path>.

And according to Drush Documentation page, install the version you want (i.e. 7).

  composer global require drush/drush:7.*
5
# Remove the current version of drush.
composer global remove drush/drush
# Install drush version 7.
composer global require drush/drush:7.*
3
  • It might help to explain what those lines of code do the person asking understands the impact of running those commands.
    – Shawn Conn
    Oct 18, 2015 at 20:07
  • It seemed obvious to me, but, ok.
    – cilefen
    Oct 19, 2015 at 14:40
  • 'global' means that composer will use your /home directory, for your user. Not your current directory, for your project.
    – user18099
    Jan 29, 2019 at 20:26
1

You can install drush as git clone, and either checkout master or a tag to accomplish this. Just remember to do a composer install if you checkout a version that uses composer (pretty sure all of the 7.x tags do, not sure about the 6.x tags), or add this as a post-checkout hook.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.