Use drush to install and enable modules in drupal

Use drush to install and enable modules in drupal, Drush is a command line shell and scripting interface for Drupal. By using Drush it will be easier to install, enable, disable, uninstall modules themes. The Drush Project Manager allows you to download, enable, disable, uninstall, update modules/themes/profiles/translations from the command line in a very simple way.

Use drush to install and enable modules in drupal is an article in the series of Step by step guide to learn drupal7.

#Part 2 @ Day 7
For using drush command line you need to install it. If you don’t have drush installed please read how to install drush in windows.

1

Using drush to install modules in windows wamp server

  1. Open up drush command line prompt from desktop link or from program files.

    Using Drush To Install Modules in windows wamp server step one

    Step One : Open drush Command Prompt

  2. Change the directory path to your drupal installation in your hard drive.
  3. For that type cd ../
    as many times as you get out to hard drive root

    Using Drush to install modules in windows wamp server step two

    Step Two : Move to the drupal root folder from command line

  4. Change the drive to drive letter like cd C:/
  5. Navigate to your-drupal-installtion path, in my case it C:/wamp/www/your-drupal-installation
    cd wamp\www\your-drupal-installtion

    Using Drush to Install Modules in windows wamp server step three

    Step Three : Move to drupal folder

  6. Then enter this command drush dl module-name(pathauto) or theme-name
    Enter project as same path name drupal.org/project/pathauto
    Actual command is drush dl pathauto

    Using drush to install modules in windows wamp server step four

    Step Four: Download the module using drush command

  7. After that it will downloads the module into your-drupal-installtion/sites/all/modules or themes directory
2

Using drush to enable modules in windows wamp server

For enabling the module, first download using any of the steps or else you can follow above step.

  1. Open up drush command line prompt from desktop link or from program files.
  2. Change the directory path to your drupal installation in your hard drive.
  3. Then enter this command drush en module-name(pathauto) or theme-name
    Using Drush to enable modules in windows wamp server step one

    Step One: Enabling drupal module command

    Enter project as same path name drupal.org/project/pathauto
    Actual command is drush en pathauto

    • If the module has any dependencies it will asks you to install them, before enabling the module.
    • fill y and press enter.
      Using Drush to enable modules in windows wamp server step Two

      Step Two : Drupal module dependencies if any

  4. After downloading dependencies, it will asks for confirmation one more time.
  5. Enter y and press enter.
    Using Drush to enable modules in windows wamp server step Three

    Step Three : Confirm second time, to activate dependency modules

  6. After that it will enables the module.
    Using Drush to enable modules in windows wamp server step Three

    Step Four : You can see the confirmation message.

I hope this article helped you to learn Using drush to install and enable modules in drupal 7. To get latest news and updates follow us on twitter & facebook, subscribe to newsletter. If you have any feedback please let us know by using comment form.

Vivek Vengala
 

Vivek Vengala is a Online Entrepreneur, Web Developer from Hyderabad India.

Click Here to Leave a Comment Below 0 comments

Leave a Reply:

x

Join My Facebook Group to Receive Coding Tutorial for Free

email-subsribe