This document introduces Drush, a command line shell and scripting interface for Drupal. It allows users to perform common Drupal tasks and operations like site building, installation, updates and maintenance from the command line. The document provides examples of common Drush commands for tasks such as downloading modules, enabling modules, updating modules, taking a site offline and more. It also discusses how aliases allow Drush commands to be run on remote and local sites.
12. The
Shell
• a.k.a.
Terminal,
Command
Line,
CLI
• Type
commands
to
interact
with
your
computer
• Windows
=
DOS
and
PowerShell
• Linux
/
OSX
=
bash,
sh,
rsh
Tuesday, November 29, 2011
29. site-install (si)
Install Drupal along with modules/
themes/configuration using the
specified install profile.
Tuesday, November 29, 2011
30. drush site-install
Could not find a Drupal settings.php file
at ./sites/default/settings.php.
Could not determine database connection
parameters. Pass --db-url option .
Tuesday, November 29, 2011
34. Examples
site-install --db-url=mysql://....
Run the install command, using the db-url
“mysql://...” (no arguments)
cache-clear theme
Clear the theme cache (no options)
dl --destination=/tmp/drupal drupal
Download Drupal to /tmp/drupal
Tuesday, November 29, 2011
57. Aliases
• Used
to
run
drush
commands
from
anywhere.
• Syntax:
drush
@myalias
cc
all
• myalias
could
be
local,
or
remote.
• Stored
in
~/.drush
Tuesday, November 29, 2011