How should I install Drush on WSL when running the following command shown in the Drush documentation fails?
php -r "readfile('http://files.drush.org/drush.phar');" > drush
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityHow should I install Drush on WSL when running the following command shown in the Drush documentation fails?
php -r "readfile('http://files.drush.org/drush.phar');" > drush
Better to follow this to require with composer: https://www.drupal.org/node/1248790
Install composer globaly:
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
Require drush:
composer global require drush/drush:7.*
The instructions in drupal.org also show how to add the path so you can use drush from everywhere.
Im working with WSL and it works great.