Intro to drush
Diana Montalion Dupuis : mooncougar
 diana: moon goddess + montalion: mountain lion
 diana@fourkitchens.com
Aaron Forsander : pifantastic
 forsander@fourkitchens.com


Cheat Sheet: http://www.fourkitchens.com
 Follow along with demonstrations.

Four Kitchens : @fourkitchens
Drush




DrupalCamp Austin 2010
Drush
”Drush is a command line shell and Unix scripting
interface for Drupal, a veritable Swiss Army knife
designed to make life easier for those of us who
spend some of our working hours hacking away at
the command prompt.”




DrupalCamp Austin 2010
Drush
”Drush is a command line shell and Unix scripting
interface for Drupal, a veritable Swiss Army knife
designed to make life easier for those of us who
spend some of our working hours hacking away at
the command prompt.”

Know what that means? Me neither.


DrupalCamp Austin 2010
Drush is
Drush is
Shortcuts.
You should be here if
You should be here if
• You don’t know what drush does.
You should be here if
• You don’t know what drush does.
• You know what drush does but haven't used it,
much.
You should be here if
• You don’t know what drush does.
• You know what drush does but haven't used it,
much.
• You don't break out in hives when someone says
"command line".
You should be here if
• You don’t know what drush does.
• You know what drush does but haven't used it,
much.
• You don't break out in hives when someone says
"command line".
• You do break out in hives but must use it anyway.
You should be here if
• You don’t know what drush does.
• You know what drush does but haven't used it,
much.
• You don't break out in hives when someone says
"command line".
• You do break out in hives but must use it anyway.
• You've installed a Drupal site and added modules,
like CCK or Views.
You should be here if
• You don’t know what drush does.
• You know what drush does but haven't used it,
much.
• You don't break out in hives when someone says
"command line".
• You do break out in hives but must use it anyway.
• You've installed a Drupal site and added modules,
like CCK or Views.
• You are a New England Patriots fan.
You should not be here if
You should not be here if
• You know what “drush fu” means and when to type
it.
You should not be here if
• You know what “drush fu” means and when to type
it.
• You use drush for many common tasks already.
You should not be here if
• You know what “drush fu” means and when to type
it.
• You use drush for many common tasks already.
• You heckle.
You should not be here if
• You know what “drush fu” means and when to type
it.
• You use drush for many common tasks already.
• You heckle.
• You are a Colts fan.
Why I rejected drush
Why I rejected drush
• I went to a presentation and thought, “I can do all
of this already, without the learning curve.”
Why I rejected drush
• I went to a presentation and thought, “I can do all
of this already, without the learning curve.”
• I was intimidated by the setup process.
Why I rejected drush
• I went to a presentation and thought, “I can do all
of this already, without the learning curve.”
• I was intimidated by the setup process.
• I wasn’t using the command line as much back
then. Unfortunately.
Why I rejected drush
• I went to a presentation and thought, “I can do all
of this already, without the learning curve.”
• I was intimidated by the setup process.
• I wasn’t using the command line as much back
then. Unfortunately.
• A few things were kinda cool but kinda cool is not
a reason to adopt new technology.
Why I rejected drush
• I went to a presentation and thought, “I can do all
of this already, without the learning curve.”
• I was intimidated by the setup process.
• I wasn’t using the command line as much back
then. Unfortunately.
• A few things were kinda cool but kinda cool is not
a reason to adopt new technology.
• Really.
Why I <3 drush now
Why I <3 drush now
• I worked in larger environments where doing
things administratively or with FTP wasn’t possible.
Thus discovering the error of my ways.
Why I <3 drush now
• I worked in larger environments where doing
things administratively or with FTP wasn’t possible.
Thus discovering the error of my ways.
• I can admit when I’m wrong. Usually.
Why I <3 drush now
• I worked in larger environments where doing
things administratively or with FTP wasn’t possible.
Thus discovering the error of my ways.
• I can admit when I’m wrong. Usually.
• I was trained by James Sansbury (g0rban) to use it
more skillfully.
Why I <3 drush now
• I worked in larger environments where doing
things administratively or with FTP wasn’t possible.
Thus discovering the error of my ways.
• I can admit when I’m wrong. Usually.
• I was trained by James Sansbury (g0rban) to use it
more skillfully.
• My team created custom drush commands - the
proverbial straw.
Why you should use it
Why you should use it
• It’s easier. And life is hard enough.
Why you should use it
• It’s easier. And life is hard enough.
• It’s faster, which means more time for watching
football.
Why you should use it
• It’s easier. And life is hard enough.
• It’s faster, which means more time for watching
football.
• Better command-line skills == a better, more
confident developer. Iow, it feels good.
Why you should use it
• It’s easier. And life is hard enough.
• It’s faster, which means more time for watching
football.
• Better command-line skills == a better, more
confident developer. Iow, it feels good.
• Command-line tasks are more repeatable and
(many are) undoable - you have a history.
Why you should use it
• It’s easier. And life is hard enough.
• It’s faster, which means more time for watching
football.
• Better command-line skills == a better, more
confident developer. Iow, it feels good.
• Command-line tasks are more repeatable and
(many are) undoable - you have a history.
• You will (probably) have to know how to use it
someday (soon). You will want to use drush 4.
This quarterback
comments his code and
follows best practices.
This quarterback
                          This quarterback
comments his code and
                          hacks core.
follows best practices.
Common drush tasks
Common drush tasks
• Install Drupal.
Common drush tasks
• Install Drupal.
• Install, enable, and update modules and themes.
Common drush tasks
• Install Drupal.
• Install, enable, and update modules and themes.
• Run update.php.
Common drush tasks
• Install Drupal.
• Install, enable, and update modules and themes.
• Run update.php.
• Clear the cache.
Common drush tasks
• Install Drupal.
• Install, enable, and update modules and themes.
• Run update.php.
• Clear the cache.
• Run cron.
Common drush tasks
• Install Drupal.
• Install, enable, and update modules and themes.
• Run update.php.
• Clear the cache.
• Run cron.
• Disable and uninstall modules.
Common drush tasks
• Install Drupal.
• Install, enable, and update modules and themes.
• Run update.php.
• Clear the cache.
• Run cron.
• Disable and uninstall modules.
• Database tasks (sql-dump, sql-cli).
Common drush tasks
• Install Drupal.
• Install, enable, and update modules and themes.
• Run update.php.
• Clear the cache.
• Run cron.
• Disable and uninstall modules.
• Database tasks (sql-dump, sql-cli).
• Set variables (vget, vset).
Common drush tasks
• Install Drupal.
• Install, enable, and update modules and themes.
• Run update.php.
• Clear the cache.
• Run cron.
• Disable and uninstall modules.
• Database tasks (sql-dump, sql-cli).
• Set variables (vget, vset).
• Revert or update features.
Common drush tasks
• Install Drupal.
• Install, enable, and update modules and themes.
• Run update.php.
• Clear the cache.
• Run cron.
• Disable and uninstall modules.
• Database tasks (sql-dump, sql-cli).
• Set variables (vget, vset).
• Revert or update features.
• Create dummy content or users.
Common drush tasks
• Install Drupal.
• Install, enable, and update modules and themes.
• Run update.php.
• Clear the cache.
• Run cron.
• Disable and uninstall modules.
• Database tasks (sql-dump, sql-cli).
• Set variables (vget, vset).
• Revert or update features.
• Create dummy content or users.
• Makefiles (custom installation profiles).
Common drush tasks
• Install Drupal.
• Install, enable, and update modules and themes.
• Run update.php.
• Clear the cache.
• Run cron.
• Disable and uninstall modules.
• Database tasks (sql-dump, sql-cli).
• Set variables (vget, vset).
• Revert or update features.
• Create dummy content or users.
• Makefiles (custom installation profiles).
• Custom tasks you create.
Which drush
Which drush
• Drush is constantly evolving, so the version you
install dictates what you can (and can not) do with it.
Which drush
• Drush is constantly evolving, so the version you
install dictates what you can (and can not) do with it.
• Not all commands work on all versions of Drupal.
Which drush
• Drush is constantly evolving, so the version you
install dictates what you can (and can not) do with it.
• Not all commands work on all versions of Drupal.
• Drush requires PHP version 5.2 or better.
Which drush
• Drush is constantly evolving, so the version you
install dictates what you can (and can not) do with it.
• Not all commands work on all versions of Drupal.
• Drush requires PHP version 5.2 or better.
• We are installing drush 3.
Which drush
• Drush is constantly evolving, so the version you
install dictates what you can (and can not) do with it.
• Not all commands work on all versions of Drupal.
• Drush requires PHP version 5.2 or better.
• We are installing drush 3.
• We are installing drush on a Linux server.  We <3
Linux servers. Same procedure for Mac. Windows
instructions are in the README.txt file.
Essential Resource
http://drush.ws
Terminal tools
Terminal tools
• On MacOS, you can just open a terminal window.
Terminal tools
• On MacOS, you can just open a terminal window.
• We use Coda and it has a built-in terminal.
Terminal tools
• On MacOS, you can just open a terminal window.
• We use Coda and it has a built-in terminal.
• If you (must) use a PC, you can use cygwin or
PuTTy (much better than cmd.exe and installing ssh
client.)
Terminal tools
• On MacOS, you can just open a terminal window.
• We use Coda and it has a built-in terminal.
• If you (must) use a PC, you can use cygwin or
PuTTy (much better than cmd.exe and installing ssh
client.)
• If you use Linux, you probably know how to do this
already. 
Common commands
Common commands
• Log in: ssh username@example.com
Common commands
• Log in: ssh username@example.com
• (a note about keys)
Common commands
• Log in: ssh username@example.com
• (a note about keys)
• Look inside: ls
Common commands
• Log in: ssh username@example.com
• (a note about keys)
• Look inside: ls
• Go into: cd  /directory
Common commands
• Log in: ssh username@example.com
• (a note about keys)
• Look inside: ls
• Go into: cd  /directory
• Go up: cd ..
Common commands
• Log in: ssh username@example.com
• (a note about keys)
• Look inside: ls
• Go into: cd  /directory
• Go up: cd ..
• Let me do important stuff: sudo
Common commands
• Log in: ssh username@example.com
• (a note about keys)
• Look inside: ls
• Go into: cd  /directory
• Go up: cd ..
• Let me do important stuff: sudo
• Get it: wget http://somewhere.com/file.tar.gz
Common commands
• Log in: ssh username@example.com
• (a note about keys)
• Look inside: ls
• Go into: cd  /directory
• Go up: cd ..
• Let me do important stuff: sudo
• Get it: wget http://somewhere.com/file.tar.gz
• Unpack it: tar xvf
Common commands
• Log in: ssh username@example.com
• (a note about keys)
• Look inside: ls
• Go into: cd  /directory
• Go up: cd ..
• Let me do important stuff: sudo
• Get it: wget http://somewhere.com/file.tar.gz
• Unpack it: tar xvf
• Change permissions: chmod
Common commands
• Log in: ssh username@example.com
• (a note about keys)
• Look inside: ls
• Go into: cd  /directory
• Go up: cd ..
• Let me do important stuff: sudo
• Get it: wget http://somewhere.com/file.tar.gz
• Unpack it: tar xvf
• Change permissions: chmod
• Remove *caution*: rm
Common commands
• Log in: ssh username@example.com
• (a note about keys)
• Look inside: ls
• Go into: cd  /directory
• Go up: cd ..
• Let me do important stuff: sudo
• Get it: wget http://somewhere.com/file.tar.gz
• Unpack it: tar xvf
• Change permissions: chmod
• Remove *caution*: rm
• Link it: ln -s
Common commands
• Log in: ssh username@example.com
• (a note about keys)
• Look inside: ls
• Go into: cd  /directory
• Go up: cd ..
• Let me do important stuff: sudo
• Get it: wget http://somewhere.com/file.tar.gz
• Unpack it: tar xvf
• Change permissions: chmod
• Remove *caution*: rm
• Link it: ln -s
• Move: mv and Copy: cp
Common commands
• Log in: ssh username@example.com
• (a note about keys)
• Look inside: ls
• Go into: cd  /directory
• Go up: cd ..
• Let me do important stuff: sudo
• Get it: wget http://somewhere.com/file.tar.gz
• Unpack it: tar xvf
• Change permissions: chmod
• Remove *caution*: rm
• Link it: ln -s
• Move: mv and Copy: cp
• Complete file name: tab
Common commands
• Log in: ssh username@example.com
• (a note about keys)
• Look inside: ls
• Go into: cd  /directory
• Go up: cd ..
• Let me do important stuff: sudo
• Get it: wget http://somewhere.com/file.tar.gz
• Unpack it: tar xvf
• Change permissions: chmod
• Remove *caution*: rm
• Link it: ln -s
• Move: mv and Copy: cp
• Complete file name: tab
This team contributes
modules and themes.
This team contributes   This team hacks
modules and themes.     core.
Installing drush
Installing drush
• Go to the directory you want drush to live in: cd /
usr/local/share/
Installing drush
• Go to the directory you want drush to live in: cd /
usr/local/share/
• Get drush: [sudo] wget http://ftp.drupal.org/files/
projects/drush-6.x-3.3.tar.gz
Installing drush
• Go to the directory you want drush to live in: cd /
usr/local/share/
• Get drush: [sudo] wget http://ftp.drupal.org/files/
projects/drush-6.x-3.3.tar.gz
• Unpack it: tar xvf drush-6.x-3.3.tar.gz
Installing drush
• Go to the directory you want drush to live in: cd /
usr/local/share/
• Get drush: [sudo] wget http://ftp.drupal.org/files/
projects/drush-6.x-3.3.tar.gz
• Unpack it: tar xvf drush-6.x-3.3.tar.gz
• Remove the package: rm drush-6.x-3.3.tar.gz
Installing drush
• Go to the directory you want drush to live in: cd /
usr/local/share/
• Get drush: [sudo] wget http://ftp.drupal.org/files/
projects/drush-6.x-3.3.tar.gz
• Unpack it: tar xvf drush-6.x-3.3.tar.gz
• Remove the package: rm drush-6.x-3.3.tar.gz
• Change permissions: chmod u+x drush
Installing drush
• Go to the directory you want drush to live in: cd /
usr/local/share/
• Get drush: [sudo] wget http://ftp.drupal.org/files/
projects/drush-6.x-3.3.tar.gz
• Unpack it: tar xvf drush-6.x-3.3.tar.gz
• Remove the package: rm drush-6.x-3.3.tar.gz
• Change permissions: chmod u+x drush
• Create a link: ln -s /usr/local/share/drush/drush /
usr/local/bin/drush
Installing drush
• Go to the directory you want drush to live in: cd /
usr/local/share/
• Get drush: [sudo] wget http://ftp.drupal.org/files/
projects/drush-6.x-3.3.tar.gz
• Unpack it: tar xvf drush-6.x-3.3.tar.gz
• Remove the package: rm drush-6.x-3.3.tar.gz
• Change permissions: chmod u+x drush
• Create a link: ln -s /usr/local/share/drush/drush /
usr/local/bin/drush
• Run drush: [sudo] drush
Installing Drupal
Installing Drupal
• Create a database in your usual way.
Installing Drupal
• Create a database in your usual way.
• cd path/to/webroot (often this is www)
Installing Drupal
• Create a database in your usual way.
• cd path/to/webroot (often this is www)
• drush dl
Installing Drupal
• Create a database in your usual way.
• cd path/to/webroot (often this is www)
• drush dl
• mv drupal-6.XX drupal
Installing Drupal
• Create a database in your usual way.
• cd path/to/webroot (often this is www)
• drush dl
• mv drupal-6.XX drupal
• (notes on where to put files)
Installing Drupal
• Create a database in your usual way.
• cd path/to/webroot (often this is www)
• drush dl
• mv drupal-6.XX drupal
• (notes on where to put files)
• drush site-install --db-url=mysql://
root:pass@localhost:port/dbname
Installing Drupal
• Create a database in your usual way.
• cd path/to/webroot (often this is www)
• drush dl
• mv drupal-6.XX drupal
• (notes on where to put files)
• drush site-install --db-url=mysql://
root:pass@localhost:port/dbname
• Unfortunately, that only works in Drupal 7.
Installing Views and CCK
Installing Views and CCK
• cd into your drupal directory
Installing Views and CCK
• cd into your drupal directory
• drush dl cck views
Installing Views and CCK
• cd into your drupal directory
• drush dl cck views
• drush en views content
Installing Views and CCK
• cd into your drupal directory
• drush dl cck views
• drush en views content
• Brilliant drush will put them in your sites/all/
modules directory.
Installing Views and CCK
• cd into your drupal directory
• drush dl cck views
• drush en views content
• Brilliant drush will put them in your sites/all/
modules directory.
• Let’s watch Aaron do it.
This coach sends his
players to Drupalcon.
This coach sends his
                        This coach hacks core.
players to Drupalcon.
Uninstall Views
Uninstall Views
• drush dis views
Uninstall Views
• drush dis views
• drush uninstall views
Run update.php
Run update.php
• drush updatedb
Clear the cache
Clear the cache
• drush cc
Run cron
Run cron
• drush cron
Run cron
• drush cron
• You’ll see more messages that don’t show up on
the regular cron page.
Save kittens - go Pats!

Intro to Drush

  • 1.
    Intro to drush DianaMontalion Dupuis : mooncougar diana: moon goddess + montalion: mountain lion diana@fourkitchens.com Aaron Forsander : pifantastic forsander@fourkitchens.com Cheat Sheet: http://www.fourkitchens.com Follow along with demonstrations. Four Kitchens : @fourkitchens
  • 2.
  • 3.
    Drush ”Drush is acommand line shell and Unix scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.” DrupalCamp Austin 2010
  • 4.
    Drush ”Drush is acommand line shell and Unix scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.” Know what that means? Me neither. DrupalCamp Austin 2010
  • 5.
  • 6.
  • 7.
  • 8.
    You should behere if • You don’t know what drush does.
  • 9.
    You should behere if • You don’t know what drush does. • You know what drush does but haven't used it, much.
  • 10.
    You should behere if • You don’t know what drush does. • You know what drush does but haven't used it, much. • You don't break out in hives when someone says "command line".
  • 11.
    You should behere if • You don’t know what drush does. • You know what drush does but haven't used it, much. • You don't break out in hives when someone says "command line". • You do break out in hives but must use it anyway.
  • 12.
    You should behere if • You don’t know what drush does. • You know what drush does but haven't used it, much. • You don't break out in hives when someone says "command line". • You do break out in hives but must use it anyway. • You've installed a Drupal site and added modules, like CCK or Views.
  • 13.
    You should behere if • You don’t know what drush does. • You know what drush does but haven't used it, much. • You don't break out in hives when someone says "command line". • You do break out in hives but must use it anyway. • You've installed a Drupal site and added modules, like CCK or Views. • You are a New England Patriots fan.
  • 14.
    You should notbe here if
  • 15.
    You should notbe here if • You know what “drush fu” means and when to type it.
  • 16.
    You should notbe here if • You know what “drush fu” means and when to type it. • You use drush for many common tasks already.
  • 17.
    You should notbe here if • You know what “drush fu” means and when to type it. • You use drush for many common tasks already. • You heckle.
  • 18.
    You should notbe here if • You know what “drush fu” means and when to type it. • You use drush for many common tasks already. • You heckle. • You are a Colts fan.
  • 19.
  • 20.
    Why I rejecteddrush • I went to a presentation and thought, “I can do all of this already, without the learning curve.”
  • 21.
    Why I rejecteddrush • I went to a presentation and thought, “I can do all of this already, without the learning curve.” • I was intimidated by the setup process.
  • 22.
    Why I rejecteddrush • I went to a presentation and thought, “I can do all of this already, without the learning curve.” • I was intimidated by the setup process. • I wasn’t using the command line as much back then. Unfortunately.
  • 23.
    Why I rejecteddrush • I went to a presentation and thought, “I can do all of this already, without the learning curve.” • I was intimidated by the setup process. • I wasn’t using the command line as much back then. Unfortunately. • A few things were kinda cool but kinda cool is not a reason to adopt new technology.
  • 24.
    Why I rejecteddrush • I went to a presentation and thought, “I can do all of this already, without the learning curve.” • I was intimidated by the setup process. • I wasn’t using the command line as much back then. Unfortunately. • A few things were kinda cool but kinda cool is not a reason to adopt new technology. • Really.
  • 25.
    Why I <3drush now
  • 26.
    Why I <3drush now • I worked in larger environments where doing things administratively or with FTP wasn’t possible. Thus discovering the error of my ways.
  • 27.
    Why I <3drush now • I worked in larger environments where doing things administratively or with FTP wasn’t possible. Thus discovering the error of my ways. • I can admit when I’m wrong. Usually.
  • 28.
    Why I <3drush now • I worked in larger environments where doing things administratively or with FTP wasn’t possible. Thus discovering the error of my ways. • I can admit when I’m wrong. Usually. • I was trained by James Sansbury (g0rban) to use it more skillfully.
  • 29.
    Why I <3drush now • I worked in larger environments where doing things administratively or with FTP wasn’t possible. Thus discovering the error of my ways. • I can admit when I’m wrong. Usually. • I was trained by James Sansbury (g0rban) to use it more skillfully. • My team created custom drush commands - the proverbial straw.
  • 30.
  • 31.
    Why you shoulduse it • It’s easier. And life is hard enough.
  • 32.
    Why you shoulduse it • It’s easier. And life is hard enough. • It’s faster, which means more time for watching football.
  • 33.
    Why you shoulduse it • It’s easier. And life is hard enough. • It’s faster, which means more time for watching football. • Better command-line skills == a better, more confident developer. Iow, it feels good.
  • 34.
    Why you shoulduse it • It’s easier. And life is hard enough. • It’s faster, which means more time for watching football. • Better command-line skills == a better, more confident developer. Iow, it feels good. • Command-line tasks are more repeatable and (many are) undoable - you have a history.
  • 35.
    Why you shoulduse it • It’s easier. And life is hard enough. • It’s faster, which means more time for watching football. • Better command-line skills == a better, more confident developer. Iow, it feels good. • Command-line tasks are more repeatable and (many are) undoable - you have a history. • You will (probably) have to know how to use it someday (soon). You will want to use drush 4.
  • 37.
    This quarterback comments hiscode and follows best practices.
  • 38.
    This quarterback This quarterback comments his code and hacks core. follows best practices.
  • 39.
  • 40.
    Common drush tasks •Install Drupal.
  • 41.
    Common drush tasks •Install Drupal. • Install, enable, and update modules and themes.
  • 42.
    Common drush tasks •Install Drupal. • Install, enable, and update modules and themes. • Run update.php.
  • 43.
    Common drush tasks •Install Drupal. • Install, enable, and update modules and themes. • Run update.php. • Clear the cache.
  • 44.
    Common drush tasks •Install Drupal. • Install, enable, and update modules and themes. • Run update.php. • Clear the cache. • Run cron.
  • 45.
    Common drush tasks •Install Drupal. • Install, enable, and update modules and themes. • Run update.php. • Clear the cache. • Run cron. • Disable and uninstall modules.
  • 46.
    Common drush tasks •Install Drupal. • Install, enable, and update modules and themes. • Run update.php. • Clear the cache. • Run cron. • Disable and uninstall modules. • Database tasks (sql-dump, sql-cli).
  • 47.
    Common drush tasks •Install Drupal. • Install, enable, and update modules and themes. • Run update.php. • Clear the cache. • Run cron. • Disable and uninstall modules. • Database tasks (sql-dump, sql-cli). • Set variables (vget, vset).
  • 48.
    Common drush tasks •Install Drupal. • Install, enable, and update modules and themes. • Run update.php. • Clear the cache. • Run cron. • Disable and uninstall modules. • Database tasks (sql-dump, sql-cli). • Set variables (vget, vset). • Revert or update features.
  • 49.
    Common drush tasks •Install Drupal. • Install, enable, and update modules and themes. • Run update.php. • Clear the cache. • Run cron. • Disable and uninstall modules. • Database tasks (sql-dump, sql-cli). • Set variables (vget, vset). • Revert or update features. • Create dummy content or users.
  • 50.
    Common drush tasks •Install Drupal. • Install, enable, and update modules and themes. • Run update.php. • Clear the cache. • Run cron. • Disable and uninstall modules. • Database tasks (sql-dump, sql-cli). • Set variables (vget, vset). • Revert or update features. • Create dummy content or users. • Makefiles (custom installation profiles).
  • 51.
    Common drush tasks •Install Drupal. • Install, enable, and update modules and themes. • Run update.php. • Clear the cache. • Run cron. • Disable and uninstall modules. • Database tasks (sql-dump, sql-cli). • Set variables (vget, vset). • Revert or update features. • Create dummy content or users. • Makefiles (custom installation profiles). • Custom tasks you create.
  • 52.
  • 53.
    Which drush • Drushis constantly evolving, so the version you install dictates what you can (and can not) do with it.
  • 54.
    Which drush • Drushis constantly evolving, so the version you install dictates what you can (and can not) do with it. • Not all commands work on all versions of Drupal.
  • 55.
    Which drush • Drushis constantly evolving, so the version you install dictates what you can (and can not) do with it. • Not all commands work on all versions of Drupal. • Drush requires PHP version 5.2 or better.
  • 56.
    Which drush • Drushis constantly evolving, so the version you install dictates what you can (and can not) do with it. • Not all commands work on all versions of Drupal. • Drush requires PHP version 5.2 or better. • We are installing drush 3.
  • 57.
    Which drush • Drushis constantly evolving, so the version you install dictates what you can (and can not) do with it. • Not all commands work on all versions of Drupal. • Drush requires PHP version 5.2 or better. • We are installing drush 3. • We are installing drush on a Linux server.  We <3 Linux servers. Same procedure for Mac. Windows instructions are in the README.txt file.
  • 58.
  • 59.
  • 60.
    Terminal tools • OnMacOS, you can just open a terminal window.
  • 61.
    Terminal tools • OnMacOS, you can just open a terminal window. • We use Coda and it has a built-in terminal.
  • 62.
    Terminal tools • OnMacOS, you can just open a terminal window. • We use Coda and it has a built-in terminal. • If you (must) use a PC, you can use cygwin or PuTTy (much better than cmd.exe and installing ssh client.)
  • 63.
    Terminal tools • OnMacOS, you can just open a terminal window. • We use Coda and it has a built-in terminal. • If you (must) use a PC, you can use cygwin or PuTTy (much better than cmd.exe and installing ssh client.) • If you use Linux, you probably know how to do this already. 
  • 64.
  • 65.
    Common commands • Login: ssh username@example.com
  • 66.
    Common commands • Login: ssh username@example.com • (a note about keys)
  • 67.
    Common commands • Login: ssh username@example.com • (a note about keys) • Look inside: ls
  • 68.
    Common commands • Login: ssh username@example.com • (a note about keys) • Look inside: ls • Go into: cd  /directory
  • 69.
    Common commands • Login: ssh username@example.com • (a note about keys) • Look inside: ls • Go into: cd  /directory • Go up: cd ..
  • 70.
    Common commands • Login: ssh username@example.com • (a note about keys) • Look inside: ls • Go into: cd  /directory • Go up: cd .. • Let me do important stuff: sudo
  • 71.
    Common commands • Login: ssh username@example.com • (a note about keys) • Look inside: ls • Go into: cd  /directory • Go up: cd .. • Let me do important stuff: sudo • Get it: wget http://somewhere.com/file.tar.gz
  • 72.
    Common commands • Login: ssh username@example.com • (a note about keys) • Look inside: ls • Go into: cd  /directory • Go up: cd .. • Let me do important stuff: sudo • Get it: wget http://somewhere.com/file.tar.gz • Unpack it: tar xvf
  • 73.
    Common commands • Login: ssh username@example.com • (a note about keys) • Look inside: ls • Go into: cd  /directory • Go up: cd .. • Let me do important stuff: sudo • Get it: wget http://somewhere.com/file.tar.gz • Unpack it: tar xvf • Change permissions: chmod
  • 74.
    Common commands • Login: ssh username@example.com • (a note about keys) • Look inside: ls • Go into: cd  /directory • Go up: cd .. • Let me do important stuff: sudo • Get it: wget http://somewhere.com/file.tar.gz • Unpack it: tar xvf • Change permissions: chmod • Remove *caution*: rm
  • 75.
    Common commands • Login: ssh username@example.com • (a note about keys) • Look inside: ls • Go into: cd  /directory • Go up: cd .. • Let me do important stuff: sudo • Get it: wget http://somewhere.com/file.tar.gz • Unpack it: tar xvf • Change permissions: chmod • Remove *caution*: rm • Link it: ln -s
  • 76.
    Common commands • Login: ssh username@example.com • (a note about keys) • Look inside: ls • Go into: cd  /directory • Go up: cd .. • Let me do important stuff: sudo • Get it: wget http://somewhere.com/file.tar.gz • Unpack it: tar xvf • Change permissions: chmod • Remove *caution*: rm • Link it: ln -s • Move: mv and Copy: cp
  • 77.
    Common commands • Login: ssh username@example.com • (a note about keys) • Look inside: ls • Go into: cd  /directory • Go up: cd .. • Let me do important stuff: sudo • Get it: wget http://somewhere.com/file.tar.gz • Unpack it: tar xvf • Change permissions: chmod • Remove *caution*: rm • Link it: ln -s • Move: mv and Copy: cp • Complete file name: tab
  • 78.
    Common commands • Login: ssh username@example.com • (a note about keys) • Look inside: ls • Go into: cd  /directory • Go up: cd .. • Let me do important stuff: sudo • Get it: wget http://somewhere.com/file.tar.gz • Unpack it: tar xvf • Change permissions: chmod • Remove *caution*: rm • Link it: ln -s • Move: mv and Copy: cp • Complete file name: tab
  • 80.
  • 81.
    This team contributes This team hacks modules and themes. core.
  • 82.
  • 83.
    Installing drush • Goto the directory you want drush to live in: cd / usr/local/share/
  • 84.
    Installing drush • Goto the directory you want drush to live in: cd / usr/local/share/ • Get drush: [sudo] wget http://ftp.drupal.org/files/ projects/drush-6.x-3.3.tar.gz
  • 85.
    Installing drush • Goto the directory you want drush to live in: cd / usr/local/share/ • Get drush: [sudo] wget http://ftp.drupal.org/files/ projects/drush-6.x-3.3.tar.gz • Unpack it: tar xvf drush-6.x-3.3.tar.gz
  • 86.
    Installing drush • Goto the directory you want drush to live in: cd / usr/local/share/ • Get drush: [sudo] wget http://ftp.drupal.org/files/ projects/drush-6.x-3.3.tar.gz • Unpack it: tar xvf drush-6.x-3.3.tar.gz • Remove the package: rm drush-6.x-3.3.tar.gz
  • 87.
    Installing drush • Goto the directory you want drush to live in: cd / usr/local/share/ • Get drush: [sudo] wget http://ftp.drupal.org/files/ projects/drush-6.x-3.3.tar.gz • Unpack it: tar xvf drush-6.x-3.3.tar.gz • Remove the package: rm drush-6.x-3.3.tar.gz • Change permissions: chmod u+x drush
  • 88.
    Installing drush • Goto the directory you want drush to live in: cd / usr/local/share/ • Get drush: [sudo] wget http://ftp.drupal.org/files/ projects/drush-6.x-3.3.tar.gz • Unpack it: tar xvf drush-6.x-3.3.tar.gz • Remove the package: rm drush-6.x-3.3.tar.gz • Change permissions: chmod u+x drush • Create a link: ln -s /usr/local/share/drush/drush / usr/local/bin/drush
  • 89.
    Installing drush • Goto the directory you want drush to live in: cd / usr/local/share/ • Get drush: [sudo] wget http://ftp.drupal.org/files/ projects/drush-6.x-3.3.tar.gz • Unpack it: tar xvf drush-6.x-3.3.tar.gz • Remove the package: rm drush-6.x-3.3.tar.gz • Change permissions: chmod u+x drush • Create a link: ln -s /usr/local/share/drush/drush / usr/local/bin/drush • Run drush: [sudo] drush
  • 90.
  • 91.
    Installing Drupal • Createa database in your usual way.
  • 92.
    Installing Drupal • Createa database in your usual way. • cd path/to/webroot (often this is www)
  • 93.
    Installing Drupal • Createa database in your usual way. • cd path/to/webroot (often this is www) • drush dl
  • 94.
    Installing Drupal • Createa database in your usual way. • cd path/to/webroot (often this is www) • drush dl • mv drupal-6.XX drupal
  • 95.
    Installing Drupal • Createa database in your usual way. • cd path/to/webroot (often this is www) • drush dl • mv drupal-6.XX drupal • (notes on where to put files)
  • 96.
    Installing Drupal • Createa database in your usual way. • cd path/to/webroot (often this is www) • drush dl • mv drupal-6.XX drupal • (notes on where to put files) • drush site-install --db-url=mysql:// root:pass@localhost:port/dbname
  • 97.
    Installing Drupal • Createa database in your usual way. • cd path/to/webroot (often this is www) • drush dl • mv drupal-6.XX drupal • (notes on where to put files) • drush site-install --db-url=mysql:// root:pass@localhost:port/dbname • Unfortunately, that only works in Drupal 7.
  • 98.
  • 99.
    Installing Views andCCK • cd into your drupal directory
  • 100.
    Installing Views andCCK • cd into your drupal directory • drush dl cck views
  • 101.
    Installing Views andCCK • cd into your drupal directory • drush dl cck views • drush en views content
  • 102.
    Installing Views andCCK • cd into your drupal directory • drush dl cck views • drush en views content • Brilliant drush will put them in your sites/all/ modules directory.
  • 103.
    Installing Views andCCK • cd into your drupal directory • drush dl cck views • drush en views content • Brilliant drush will put them in your sites/all/ modules directory. • Let’s watch Aaron do it.
  • 105.
    This coach sendshis players to Drupalcon.
  • 106.
    This coach sendshis This coach hacks core. players to Drupalcon.
  • 107.
  • 108.
  • 109.
    Uninstall Views • drushdis views • drush uninstall views
  • 110.
  • 111.
  • 112.
  • 113.
  • 114.
  • 115.
  • 116.
    Run cron • drushcron • You’ll see more messages that don’t show up on the regular cron page.
  • 117.