1

I installed Drush 8 using cgr (which is a safer replacement for composer global require):

cgr drush/drush:8.x-dev --prefer-source

But now I also want to install Drush 9 for certain sites. Is there a way to switch between Drush 8 and 9 easily?

1
  • 2
    It's all about site local drush these days - installing 8 globally is fine, it will automatically switch to using the local site version when one is available – Clive Jan 27 at 20:24
3

As you probably know newer Drush versions have to be installed locally. Go ahead with installing Drush 10 (Drush 9 is EOL) for certain sites. The globally installed Drush acts as Drush Launcher and will find local Drush installs.

3
  • Really? You don't need the Drush Launcher at all anymore? Drush itself acts as a Drush Launcher? How cool is that? – leymannx Jan 27 at 20:33
  • OK, if you don't need Drush 8 anymore you probably shouldn't install the legacy version and use the much leaner Drush Launcher instead. – 4k4 Jan 27 at 20:36
  • Ah okay, but if I have uncomposerized D7s laying around global Drush 8 is the way to go to act as a Launcher on the Composer projects. Nice! – leymannx Jan 28 at 15:33

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.