2. What is it?
The Drupal shell
Allows interaction with a Drupal site via
command line
Easy to use
Really useful (honest!)
3. Installing
Linux/OSX
pear channel-discover pear.drush.org
pear install drush/drush
May have to run with sudo
Might also have to run pear upgrade-all
Can also use apt-get (might not be up to date)
9. drush pm-list
List currently installed modules and themes
Use --status to filter the list by status.
Example:
drush pm-list --status=enabled
10. drush pm-download <project>
Downloads projects from Drupal.org
Includes projects, themes and even Drupal
itself
Use the --select to prompt for a certain release
Can be shortened to "drush dl"
12. drush site-install <profile>
Install a site from the command line.
--account-name to set master user username
--account-pass to set master user password
--db-url to set database connection string
Example:
drush site-install minimal --account-name=admin --account-
pass=admin --db-url=mysql://root:
QWEqwe123@localhost/drupal7
17. drush pm-updatecode <project>
Update the code of an project
Use --security-only to only get security releases
Updates the code only, use "drush updatedb"
to also apply any database updates
26. Drush Make
Sort of like install profiles
Single subject in itself
Uses a 'make' file to download all needed
modules
Makes version control easier
27. drush make-generate <makefile>
Generate a make file from an existing Drupal
install
No need to know the make file syntax inside
and out
Example:
drush make-generate mysite.make
28. Example Make File
; This file was auto-generated by drush make
core = 7.x
api = 2
projects[drupal][version] = "7.x"
; Modules
projects[ctools][version] = "1.0"
projects[devel][version] = "1.2"
projects[google_analytics][version] = "1.2"
projects[views][version] = "3.3"