Monday, April 23, 2012

Managing your BitNami Drupal installation with Drush

We are happy to announce a new version of BitNami Drupal Stack. This new version includes support for Drush. Drush is a command line shell tool and scripting interface for Drupal designed to make life easier for people who need to deploy multiple Drupal installations.

Thanks to Drush you can easily manage your Drupal modules, edit configuration settings or backup your sites from the command line.

To get started, you first need to load the right environment. This is done automatically when logging in to a virtual appliance or cloud image. If you installed Drupal on your desktop, you can do so by executing:

/path/to/bitnami-drupal-install-directory/use_drupal

and on Windows by clicking on Start Menu > BitNami Drupal Stack > Use Drupal Stack.

The following are example commands you can run after that:
  • Download and install a module, for example Content Construction Kit (CCK ) a popular plugin that allows adding custom fields to nodes using a web browser
          drush pm-download cck
    drush pm-enable cck
  • Export the Drupal database as SQL, for backup purposes
    drush sql-dump > drupal_backup.sql
  • Or you can backup everything, including your code, files, and database into a single file
    drush archive-dump default --destination=/backups/drupal_site.tar
  •  Set a variable, for example the site email address
    drush variable-set site_mail mail@example.com

More information can be found in the official Drush guide. Thanks to OpenMelva for their suggestions and feedback Drush and other aspects of our Drupal stack.