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?


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.*
# Remove the current version of drush.
composer global remove drush/drush
# Install drush version 7.
composer global require drush/drush:7.*
  • 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 '15 at 20:07
  • It seemed obvious to me, but, ok. – cilefen Oct 19 '15 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 '19 at 20:26

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, privacy policy and cookie policy

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