I have been a Drupal site builder for some time, but I kind of got started with it backwards. Recently, I have begun learning more server-end things like Drush, Git, etc. I'm playing around with a Digital Cloud virtual server, and I'm not having a problem per se, but I have found at least 4 ways to install Drush:

  • Through Pear
  • Through apt-get
  • Through Composer
  • By downloading the files straight from Github

(If it matters, I am on a Debian environment.)

It seems that Pear may be the preferred way from what I can tell, but that's just based on the fact that I found that to be recommended slightly more frequently than the other methods.

Is this just a matter of preference? I admit I am not very familiar with Pear and Composer. Or is there a method that most devs consider to be a best practice?

Thank you.

  • 2
    The pear and apt-get methods aren't even mentioned in the docs any more. Beyond that, use Composer if you want to install the dependencies automatically, or use the manual method if you want to manage those yourself. Personally I'd always use Composer, but the point of having multiple installation methods is so that you can choose the one that suits your needs/experience
    – Clive
    Jun 8 '14 at 22:59
  • Does composer let you use the exact tag you want? That is the main reason I use git.
    – mpdonadio
    Jun 9 '14 at 2:04
  • 1
    @Clive am I the only one that gets somewhat "overwhelmed" with trying to keep up with Drush and how best to install it or what built-in commands it has, or how to use multiple versions of Drush at once (for legacy sites vs D8). It seems to be a moving target and major changes seem to not be documented well ... (or current best practices) ...
    – tenken
    Jun 9 '14 at 4:22

You have to install Drush through composer because it provides all the depencies which are required for drush. apt-get is basically supported by the Linux and Debian.

So use this link to install using composer : https://github.com/drush-ops/drush

  • Composer is the best way. Everything in PHP is going to Composer, even Drupal! Drupal 8 uses composer for dependencies, no more libraries module.
    – Brady
    Jul 28 '15 at 8:21

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.