drupal Drush Install Drush


Example

Manual Global Installation

For OS X and Linux:

  1. Bring up Terminal, Bash, or your normal shell.

  2. Type the following into Terminal/Bash:

    # Download latest stable release using the code below or browse to github.com/drush-ops/drush/releases.
    php -r "readfile('http://files.drush.org/drush.phar');" > drush
    # Or use our upcoming release: php -r "readfile('http://files.drush.org/drush-unstable.phar');" > drush
    
    # Test your install.
    php drush core-status
    
    # Make `drush` executable as a command from anywhere. Destination can be anywhere on $PATH.
    chmod +x drush
    sudo mv drush /usr/local/bin
    
    # Optional. Enrich the bash startup file with completion and aliases.
    drush init
    

For Windows:

  1. Download Drush from GitHub.
  2. Extract the compressed file in your desired drive, for eg.
    C:\
    
  3. Install Drush, define the extracted folder path in the environment path variable which should also include the Apache, PHP and MySQL.
    C:\xampp\apache\bin;C:\xampp\mysql\bin;C:\xampp\php;C:\drush;
    
  4. Verify that Drush works:
    drush status
    

Composer Global Installation

  1. Install Composer globally.
  2. Add Composer's bin directory to the system path by placing export PATH="$HOME/.composer/vendor/bin:$PATH" into your ~/.bash_profile (OS X) or ~/.bashrc (Linux).
  3. Install Drush:
    composer global require drush/drush
    
  4. Verify that Drush works:
    drush status
    

More details from Drush Docs