Posted 07.24.2010 by Jack
Presented by Robert Holmes (robbiethegeek)
(Got here a bit late, but caught the very beginning of drush command overview)
Handy drush commands
- drush - listing of all the drush commands available to you
- drush status - basic info on your site
- drush sqlc (drush sql-cli) - takes you into MySQL console using the credentials of the site you're accessing with drush right now
- drush dl
- downloads code for module (project) into sites/all/
; can list multiple projects at once - drush dl
- - download a specific version of a module, e.g. drush dl filefield-6.x-3.x-dev - drush en
- enable
- drush up - upgrade code and database for Drupal core and third-party modules
- drush sql-dump - Performs a dump of the current Drupal site's database. This will vomit it all over the screen, so instead you'll want to direct the SQL dump to a file using drush sql-dump --result-file=filename.sql or drush sql-dump > filename.sql (and then
- drush cc - clear the cache that you then specify from the menu, or specify within the command as drush cc theme or drush cc all etc
- drush help
- get help on the given drush command
Random Notes
- You can use drush in conjunction with other shell commands, wrap drush commands in shell scripts, etc
- Other modules can also expose functionality and add commands to drush, e.g. devel module
- Drush supports the ability to remotely connect to a server - open an ssh connection, run a drush command, and bring it locally
- http://dgo.to/ - Drupal URL shortener AND smartener with quick paths to projects, issue queues, nodes by number, users, etc