Home > Drupal > Drupal module of the day, Drush

Drupal module of the day, Drush

Drush for Drupal

Image by tronathan via Flickr

Drush is, as the project website describes, a a command line script and shell interface for Drupal. If you are a Drupal developer pretty soon you end up using this tool. If you are a Drupal website administrator, the sooner you use it the more productive you are.

This “module” has a Drupal 7 pledge, so don’t worry about its upgrade and start using right away, that’s my advice.

Why use it? Lots of reasons. The main reason I use it is it simplifies my life while maintaining a Drupal site. Prevents lots of errors due to typing errors or working on wrong directories (just to give you two examples). Also it is the first step towards the automation of Drupal maintenance. For instance, the Drush Make extension, which can create a ready-to-use drupal site, pulling sources from various locations.

Drush detects your site based on your directory context. Let’s say your command shell is in /home/mysite/sites/all, it will read your config file from /home/mysite/sites/default/settings.php.

Some examples of using this tool are:

# drush dl drupal (downloads the latest stable version of Drupal)

# drush dl cck views (downloads the latest stable versions of cck and views)

# drush enable views (enables the views module)

# drush disable views (disables the views module)

# drush cron (runs all cron hooks)

How to install it? Well, it is not a Drupal module, you have to install it in a different way. These are the instructions for installing Drush on Ubuntu.

Well, it makes a lot of sense using this tool, so don’t hesitate to install and use it.

Categories: Drupal Tags: , , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.