The document provides instructions for installing the Drush command line shell and scripting interface for Drupal. It begins by having users change directories to where they want Drush to be installed, then use wget to download the Drush tarball file from the Drupal.org website. Further instructions will unpack and configure Drush on the system.
3. 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
4. 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
8. You should be here if
• You don’t know what drush does.
9. You should be here if
• You don’t know what drush does.
• You know what drush does but haven't used it,
much.
10. 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".
11. 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.
12. 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.
13. 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.
15. You should not be here if
• You know what “drush fu” means and when to type
it.
16. 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.
17. 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.
18. 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.
20. Why I rejected drush
• I went to a presentation and thought, “I can do all
of this already, without the learning curve.”
21. 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.
22. 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.
23. 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.
24. 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.
26. 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.
27. 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.
28. 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.
29. 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.
31. Why you should use it
• It’s easier. And life is hard enough.
32. Why you should use it
• It’s easier. And life is hard enough.
• It’s faster, which means more time for watching
football.
33. 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.
34. 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.
35. 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.
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.
53. Which drush
• Drush is constantly evolving, so the version you
install dictates what you can (and can not) do with it.
54. 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.
55. 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.
56. 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.
57. 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.
61. Terminal tools
• On MacOS, you can just open a terminal window.
• We use Coda and it has a built-in terminal.
62. 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.)
63. 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.
67. Common commands
• Log in: ssh username@example.com
• (a note about keys)
• Look inside: ls
68. Common commands
• Log in: ssh username@example.com
• (a note about keys)
• Look inside: ls
• Go into: cd /directory
69. Common commands
• Log in: ssh username@example.com
• (a note about keys)
• Look inside: ls
• Go into: cd /directory
• Go up: cd ..
70. 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
71. 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
72. 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
73. 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
74. 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
75. 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
76. 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
77. 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
78. 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
83. Installing drush
• Go to the directory you want drush to live in: cd /
usr/local/share/
84. 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
85. 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
86. 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
87. 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
88. 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
89. 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
93. Installing Drupal
• Create a database in your usual way.
• cd path/to/webroot (often this is www)
• drush dl
94. Installing Drupal
• Create a database in your usual way.
• cd path/to/webroot (often this is www)
• drush dl
• mv drupal-6.XX drupal
95. 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)
96. 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
97. 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.
101. Installing Views and CCK
• cd into your drupal directory
• drush dl cck views
• drush en views content
102. 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.
103. 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.