Wednesday, September 22, 2010

Drush command line shell and scripting interface for Drupal

I haven't heard about Drush command line tool until recently. Books about Drupal do not talk about this nifty tool, not even the advanced ones. Drush takes the power of command line, it can be savior for lazy hacker like me. The only prerequisite for using drush is secure shell access to execute commands on your web server server.

First thing I learnt to do with drush is download, upgrade and enable modules. It a quick and efficient way of upgrade modules.


# /usr/share/drush/drush disable link
The following modules will be disabled: link
Do you really want to continue? (y/n): y
Link was disabled successfully.                                                                                                                   [ok]
# /usr/share/drush/drush uninstall link
The following modules will be uninstalled: link
Do you really want to continue? (y/n): y
link was successfully uninstalled.                                                                                                                [ok]
# /usr/share/drush/drush dl link
Project link (6.x-2.9) downloaded to /var/www/drupal/sites/all/modules/.                                                                        [success]
# /usr/share/drush/drush enable link
The following modules will be enabled: link
Do you really want to continue? (y/n): y
Link was enabled successfully.       

Another favorite feature of drush is ability to execute sql commands to debug problems. /usr/share/drush/drush sql cli

Learn more about the various options and rediscover of the joy of Drupal.

2 comments:

  1. That sounds like a real time-saver. First time I'd heard of it. Nice!

    ReplyDelete
  2. You are right Tom! There a lot of features that are really useful for drupal administrators and developers.

    ReplyDelete

You can leave a comment here using your Google account, OpenID or as an anonymous user.

Popular Posts