Skip to content

Instantly share code, notes, and snippets.

@punyaruchal
Last active July 12, 2018 11:34
Show Gist options
  • Save punyaruchal/51c9d1b4c3f3977153c8f13161c59811 to your computer and use it in GitHub Desktop.
Save punyaruchal/51c9d1b4c3f3977153c8f13161c59811 to your computer and use it in GitHub Desktop.
Installing Drush specific version on your mac

Download and unpack Drush in a local folder

  • /Users/myusername/drush
(I like to keep my apps together, so I put my drush directory in /Users/myusername/drush)
  • get drush from here: GitHub repo

https://github.com/drush-ops/drush

https://github.com/drush-ops/drush/releases

Install Composer

  • In terminal run these commands:
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/bin/composer
  1. from the drush directory run
$ composer install
  • See below if your PHP version is too low and you get PHP related errors

  • Check by running in terminal >composer (this will list all of composer’s commands)

Tell OS High Sierra where to find Drush

Update your bash path

$ vim ~/.bash_profile 
or 
$ vim ~/.zshrc

add this line:

export PATH=$PATH:/Users/myusername/drush
export PATH="$HOME/drush:$PATH"

and

$ source ~/.bash_profile 
or 
$ source ~/.zshrc

Create symbolic link typing in terminal:

$ ln -s /Users/myusername/drush/drush /usr/bin/drush

0r

$ cd /usr/local/bin
$ ln -s /Users/myusername/drush/drush

ALL DONE, Enjoy!

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment