Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use Drush in Drupal

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 371
    Comment on it

    Drush stands for Drupal shell, which provide shell interface for managing Drupal sites. It is a useful command line tool to perform various admin tasks using just one or two commands in the terminal. It seems very complex for newbie but when you will get familiar with Drush then it provides easy handling of Drupal sites including installation, Updating and for performing lots of admin tasks like enable/disable modules, clearing cache etc.

    For using Drush, you only needs to install Drush and after that you can operate your Drupal site.

    Installation:

    Use following command to install drush in you Ubuntu OS:

    sudo apt-get install drush

    Or click here for more information.

    Setup new project using Drush:

    If you want to install a new Drupal project using Drush then follow the instruction from this link:

    https://www.digitalocean.com/community/tutorials/how-to-install-drush-on-a-cloud-server-running-ubuntu-12-04

    Use Drush in Existing project:

    If you have an existing Drupal project then you can directly use Drush to operate this site.

    For this you just need to go to Drupal directory:

    cd /var/www/[drupal_folder_name]

    Once you are in Drupal directory, you can use all available Drush command:

    1: For checking Drush and Drupal status:

    drush status

    2: Clear cache:

    drush cc

    3: Install a new module:

    drush pm-download views  OR  drush dl views

    Then

    drush en views

    4: Get list of all installed module:

    drush pml

    5: To change any user's password:

    drush user-password admin --password="new_pass"

    6: For checking update status of installed modules:

    drush up -n | grep available

    7:  For updating a particular module:

    drush up views

    8: For updating Drupal core:

    drush up drupal

    For updating complete Drupal site:

    drush up

    For more information, please go to following links:
    https://www.digitalocean.com/community/tutorials/a-beginner-s-guide-to-drush-the-drupal-shell

     

    Thanks

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: