072e3f2916b794015c502a2c16c6b7e718d36d1e
[yaffs-website] / vendor / drush / drush / docs / install.md
1 Install/Upgrade a global Drush
2 ---------------
3 ```bash    
4 # Download latest stable release using the code below or browse to github.com/drush-ops/drush/releases.
5 wget http://files.drush.org/drush.phar
6 # Or use our upcoming release: wget http://files.drush.org/drush-unstable.phar  
7
8 # Test your install.
9 php drush.phar core-status
10
11 # Rename to `drush` instead of `php drush.phar`. Destination can be anywhere on $PATH. 
12 chmod +x drush.phar
13 sudo mv drush.phar /usr/local/bin/drush
14
15 # Optional. Enrich the bash startup file with completion and aliases.
16 drush init
17 ```
18     
19 * MAMP users, and anyone wishing to launch a non-default PHP, needs to [edit ~/.bashrc so that the right PHP is in your $PATH](http://stackoverflow.com/questions/4145667/how-to-override-the-path-of-php-to-use-the-mamp-path/10653443#10653443).
20 * We have documented [alternative ways to install](http://docs.drush.org/en/master/install-alternative/), including [Windows](http://docs.drush.org/en/master/install-alternative/#windows).
21 * If you need to pass custom php.ini values, run `php -d foo=bar drush.phar --php-options=foo=bar`
22 * Your shell now has [useful bash aliases and tab completion for command names, site aliases, options, and arguments](https://raw.githubusercontent.com/drush-ops/drush/master/examples/example.bashrc).
23 * A [drushrc.php](https://raw.githubusercontent.com/drush-ops/drush/master/examples/example.drushrc.php) has been copied to ~/.drush above. Customize it to save typing and standardize options for commands.
24 * Upgrade using this same procedure.
25
26 Install a site-local Drush
27 -----------------
28 In addition to the global Drush, it is recommended that Drupal 8 sites be [built using Composer, with Drush listed as a dependency](https://github.com/drupal-composer/drupal-project).
29
30 1. When you run `drush`, the global Drush is called first and then hands execution to the site-local Drush. This gives you the convenience of running `drush` without specifying the full path to the executable, without sacrificing the safety provided by a site-local Drush.
31 2. Optional: Copy the [examples/drush.wrapper](https://github.com/drush-ops/drush/blob/master/examples/drush.wrapper) file to your project root and modify to taste. This is a handy launcher script; add --local here to turn off all global configuration locations, and maintain consistency over configuration/aliases/commandfiles for your team.
32 3. Note that if you have multiple Drupal sites on your system, it is possible to use a different version of Drush with each one.
33
34 Drupal Compatibility
35 -----------------
36 Drush Version | Drush Branch  | PHP | Compatible Drupal versions | Code Status
37 ------------- | ---------     | --- | -------------------------- | -----------
38 Drush 9       | [master](https://travis-ci.org/drush-ops/drush)  | 5.5+ | D7, D8                 | <img src="https://travis-ci.org/drush-ops/drush.svg?branch=master">
39 Drush 8       | [8.x](https://travis-ci.org/drush-ops/drush)  | 5.4.5+ | D6, D7, D8                 | <img src="https://travis-ci.org/drush-ops/drush.svg?branch=8.x">
40 Drush 7       | [7.x](https://travis-ci.org/drush-ops/drush) | 5.3.0+ | D6, D7                     | <img src="https://travis-ci.org/drush-ops/drush.svg?branch=7.x">
41 Drush 6       | [6.x](https://travis-ci.org/drush-ops/drush) | 5.3.0+ | D6, D7                     | Unsupported
42 Drush 5       | [5.x](https://travis-ci.org/drush-ops/drush) | 5.2.0+ | D6, D7                     | Unsupported
43