FAQ

There is a lot of information about drush in various places around drupal.org and elsewhere; this page is an attempt to pull some of it together.

If you have questions about drush that are not answered here, the best thing to do is to check the drush issue queue, and ask there if you can't find an existing issue that addresses your problem.

Installing drush

  1. Where do I start?

    A: Look at the README.txt for installation and usage instructions.

Using drush with Windows

  1. Does drush work on Windows?

    A:Yes. You must use Drush5 (not yet released as of Sep 1, 2011).

Using drush to update / upgrade Drupal

  1. Do I need to disable all of my non-core modules before doing a minor update of Drupal with drush?

    A: No. See http://drupal.org/node/859426. (there is a better reference)

  2. Why does updatecode fail with "rename(): The first argument to copy() function cannot be a directory"?

    A: Use Drush 4+. For history, see http://drupal.org/node/803386.

  3. Will updatecode always remove a module's external dependencies?

    A: Yes. See http://drupal.org/node/487584.

  4. Can I force updatecode to always skip certain modules that I do not want to update, then?

    A: Yes. See --lock option in Drush4.

  5. Will updatecode drupal preserve custom installation profiles?

    A: Yes in Drush4. See http://drupal.org/node/827404 for history.

  6. Can I use updatecode to update to a non-recommended release?

    A: No. See http://drupal.org/node/760814.

  7. Do I need a Drupal site with a valid database to upgrade extensions (aka modules/themes)?

    A: Yes. See http://drupal.org/node/830572.

  8. Can I use drush to update drush?

    A: Yes. See selfupdate command.

Using drush to synchronise Drupal installations

  1. Does sql-sync work with table prefixes?

    A: NO. See http://drupal.org/node/625870.

  2. Can I use wildcards to tell sql-sync and sql-dump which tables to include or skip?

    A: Not always. This feature is native in Postgres, but not in Mysql. See http://drupal.org/node/698264.

  3. How can I sanitize the database after a sync from live to dev, for example, to remove user email addresses?

    A: Drush4 can do this with --sanitize option on sql-sync command. Commandfiles can add custom sanitize routines. See http://drupal.org/node/861822.

  4. How can I stop a developer from accidentally syncing over the sql database of the live site?

    A: See http://drupal.org/node/854722.

Miscellaneous questions

  1. How do I use variable-set with arrays?

    A: See http://drupal.org/node/664452.

  2. Can I use drush to read release notes for an extension (aka module or theme)?

    A: Not yet. See http://drupal.org/node/843740.

  3. Can I use drupal.org git with drush?

    A: Yes. Set --package-handler=git_drupalorg. In drush5, see the example shell alias called pm-clone

  4. Does drush have any unit tests (to test itself)?

    A: Yes. See the /tests subdirectory in drush5+. The tests use the PHPUnit framework..

  5. Is bash autocompletion available for drush?

    A: Yes, in Drush5. See the README.txt for more information.

  6. Shouldn't drush output errors to stderr instead of stdout?

    A: Yes, and on Drush 4+ it does. See http://drupal.org/node/639204.