Drupal Installing composer drush through command line

Drupal Installing composer and drush through command line.

This article explains drupal installing composer and drush through command line on windows environment. Composer is dependency Management for PHP. Drush is a command-line tool for building and maintaining sites.

Installing composer and drush for drupal

Composer helps you declare, manage and install dependencies of PHP projects. Use Composer to manage dependencies in your php applications.

Composer requires PHP 5.3.2+ to run. A few sensitive php settings and compile flags are also required, but when using the installer you will be warned about any incompatibilities.

Installing Composer

Download the installer to the current directory
php -r “copy(‘https://getcomposer.org/installer’, ‘composer-setup.php’);”

Verify the installer SHA-384
php -r “if (hash_file(‘SHA384’, ‘composer-setup.php’) === ‘669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410’) { echo ‘Installer verified’; } else { echo ‘Installer corrupt’; unlink(‘composer-setup.php’); } echo PHP_EOL;”

Run the installer
php composer-setup.php

To install it to specific directory
php composer-setup.php –install-dir=bin

To install a specific version
php composer-setup.php –version=1.0.0-alpha8

Remove the installer
php -r “unlink(‘composer-setup.php’);”

Test the Installation
composer -v


composer and drush


Drush is a command-line tool for building and maintaining drupal sites. Drush provides additional functionality not available via the administrative interface. It is used install he base software, modules, and themes; updating software; performing database operations, including copying and querying; resetting passwords; and clearing the cache. Doing administrative tasks using Drush is typically faster and less tedious than performing the same tasks through the administrative interface.


Installing Drush

composer require drush/drush

To run Drush
vendor/bin/drush help


Use full links:




Leave a Reply

Your email address will not be published. Required fields are marked *