drush

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
This group should probably have more organizers. See documentation on this recommendation.

Drush is a shell-based application used to control, manipulate, and administer Drupal sites. On the surface, drush is an excellent tool for updating site modules, but here is a more comprehensive list of features for drush:

  • Quick status report (get Drupal site version)
  • Run cron
  • Clear caches
  • Export site databases (SQL dump)
  • Update site code
  • Update Drupal database (run "update.php")
  • Get Info & Download Any Module & Themes
  • Enable/Disable/Uninstall Modules & Thems
  • Simulate updates/commands
  • Sync environments (perfect for DEV-STAGE-PRODUCTION)
  • plus modules offer drush add-ons, like Module Builder, Devel, Hacked!, plus many more.

You can see a list of some Drush commands available.

View the official list of modules that have Drush add-on commands available.


2009 Drush MVP Award goes to "Drush Make"

tolland76's picture

checking to see if we are running under drush?

Hi,

I had been using firePHP debugging in some of my install scripts and now I am using drush I am seeing some problems with headers like;
"Cannot send log data to FirePHP. You must have Output Buffering enabled via ob_start() or output_buffering ini directive."

so I want to wrap my debugging function to check that its the browser or drush, is there a good strategy to do that??

Thanks,

Tom

Read more
sambojambo's picture

Development style - settings.php file and Drush

Hi everyone,

Hope I'm posting in the right place for this question/discussion. I'm starting to use Drush frequently. I find it a great natural extension to the way I work as I develop on Linux.

I've come up against a bit of a problem though. I'm not sure but I assume that drush parses the settings file to do it's stuff. The way I develop I usually work with a number of sub domains , dev , test , staging.

My settings file deals with this by looking at the $_SERVER['SERVER_NAME'] to determine which domain the code is on and defining which DB to connect to.

<?php

Read more
Chris Charlton's picture

Run Drush commands in Eclipse IDE

Eclipse has a built-in feature that can save and run Drush commands for projects easily. It's just like running the shell command. The feature in Eclipse is known as the "External Tools" feature.

Only local images are allowed.

  1. Click the following menu: Run > External Tools > External Tools Configurations...
  2. Under "Program", click "New Launch Configuration"
  3. Name: Anything
  4. Location: point to the drush software (for example, /home/drupal/drush/drush)
  5. Arguments (Mac): -i /home/drupal/drush/drush/includes -v -r /Users/you/Sites/DEVELOPMENT/DRUPAL/drupal.development cache clear
  6. Click "Apply", then "Run".
  7. Repeat the command by clicking the "External Tools" icon (pictured below). I setup a favorite for clearing a site cache, and getting status of a site.
Read more
patoshi's picture

Drush Tips & Tricks & Hacks - Share your experiences and usages..

hi, i guess im still a beginner in drush as i dont really use all the commands. i haven't gotten to use devel yet as i dont see the usefulness of it yet.

but as for drush, ill share my experience with how i use it. i have a multi-site drupal code base and drush is a lifesaver having to enable, disable, and updatedb for each site. im maintaining about 5 sites now and all i use drush for is just enabling and disabling modules mainly.

Is there something else i might be missing that everyone uses frequently? like deleting users or nodes or what not?

Read more
Jody Lynn's picture

Drush now has variable get, set and delete

Drush has new commands now to manage variables.

Chris, can you add them to the drush commands page?

"Drush vget user" will give you a list of all variable names beginning with 'user' and their values. Useful to see all variable settings for a specific module, or figure out a variable's name.

"Drush vset prep 0" will let you choose from the variables beginning with 'prep' and set one to 0. Useful to quickly change simple variables, for example to disable css preprocessing.

Read more
tsaw's picture

DRUSH Update Question

Hi Chris,

Love the DRUSH tool!

I have been using it as much as I can and each time am finding new things and ways to take advantage of it.

I have a question - concerning the update and updatecode functions. I didn't see any detailed docs on recommended usage on this and was wondering if you or anyone else that is more knowledgeable on it, could show us the proper way to use these functions?

For example do we put the site in maintenance mode, disable modules prior to update, etc.

Thanks so much!

Tim

Read more
Chris Charlton's picture

Are you a Drush beginner or a pro?

Beginner
51% (49 votes)
Above Beginner
34% (33 votes)
Almost Pro
11% (11 votes)
Drush Pro
4% (4 votes)
Total votes: 97
Chris Charlton's picture

What features/uses of Drush are you interested in learning?

What in Drush are you learning, or would like to learn? Please comment below.

Read more

Drush commands reference

Run drush help [command] to view command-specific help.

Examples:

drush dl cck zen Download CCK module and Zen theme.
drush --uri=http://example.com status Show status command for the example.com multi-site.
drush help --pipe A space delimited list of commands

For details on command flags(e.g. drush sql-dump --skip-tables-key=common), see http://drush.ws/ or drush help command-name

Read more
Chris Charlton's picture

Do you use drush on local or remote environments, or both?

I use drush locally.
19% (22 votes)
I use drush on remote servers.
15% (17 votes)
I use drush on both local and remote environments.
66% (77 votes)
Total votes: 116
Chris Charlton's picture

What platform do you use drush on?

Linux
51% (60 votes)
Mac OS X / Unix
14% (16 votes)
Windows
4% (5 votes)
Other
0% (0 votes)
More than one operating system
31% (37 votes)
Total votes: 118
Subscribe with RSS Syndicate content