ADOLFO G. NASOL




http://cavhost.com
Who am I?
 Adolfo G. Nasol (danreb)
 Website builder for 4 years but get hooked in
  drupal in the last 2 years and 41 weeks
 Information and Communication Technology
  (ICT) student (June, 2012)
 A product of (TVET) Technical Vocational
  Education and Training
 Part time TVET Trainer



                    http://cavhost.com
Presenting
DRUSH FOR DRUPAL WEBSITE BUILDER




             http://cavhost.com
What is not included?
 Drush Installation
 Using drush to synchronizes and
 deploy sites
 Advance drush command like
 running arbitrary PHP script from
 drush

              http://cavhost.com
What is Drush?
Drush is a command line and
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.
              http://cavhost.com
Drush is not a module
  Drush = Drupal + Shell



         +                           =
DRUPAL   +   SHELL SCRIPTING         =   DRUSH



                http://cavhost.com
Drush is a tool
Drush provides a way
of executing
commands and scripts
on a Drupal
installation through
shell or command line
interface on your web
server
            http://cavhost.com
Do I need to learn Drush?
Q - I’m beginner, is drush for me
   too?
A - Yes!, drush command is easy

Q - What makes newbie nervous
   about drush?
A - Drush is a command line
   program and worried of
   breaking their site.

                      http://cavhost.com
Do I need to learn Drush?
Q – I think drush is only for
  developers?
A – No!, If you manage a
  Drupal website, drush is
  something you should
  know!



                    http://cavhost.com
Why developers love
Drush?
 Programmers    hate work
 that is tedious and
 repetitive, drush can
 automate repetitive tasks.

 Drush is written in PHP,
 they can easily extend
 drush if needed.

                   http://cavhost.com
What Drush can do that GUI
          can’t?


 Save   bunch of time!




                  http://cavhost.com
Why use drush?
 Use drush to keep your site up to date
 One installation to rule all your drupal site on
  your server
 A must tools for system admin
 Easy to remember commands
 Easiest way of updating drupal website, it can
  update core and modules in one command


                     http://cavhost.com
Other possible uses of
            drush
 Manage modules
 Manage users
 Execute Drupal commands
 Manipulate and extract site variables
 Executes MySQL queries using drupal
  configuration




                   http://cavhost.com
Let start using Drush!
Drush Command Structure

        Command Options Arguments

In shell just type –

        $ drush <command> [options]


                       http://cavhost.com
Drush Common Commands
   dl - Downloads a module or theme
   en - Enable module or theme
   dis - Disable module or theme
   cc - Clear the cache
   cron - Runs all registered cron hooks
   si - Do a complete drupal installation
   sql-dump - performs mysqldump
   st – Show basic information about a drupal site

                       http://cavhost.com
Drush Common Commands
 pm-list - Show list of extensions
 wd-del - Delete watchdog messages
 vget - Get a list of some or all variables
 vset - set a variable
 upd - Apply database update
 up - Update Drupal core, modules, themes
  and performs database update
 uli - Display one time login link

                    http://cavhost.com
Drush Common Commands
 ws - Show watchdog message
 sql-cli - Open a SQL command-line interface
  using Drupal’s credential
 help - To see all available command
    - example -
       $ drush help | more
   or just
       $ drush help

                   http://cavhost.com
Let’s see it in action!
             Time for demonstration
                    Thanks!

              ADOLFO G. NASOL

Blog: http://danreb.com
Website: http://cavhost.com
Drupal: http://drupal.org/user/547004
Mobile: +63 9195951276
Phone: (046) 8530347

                      http://cavhost.com
Resources and Useful Links
 http://drush.ws/resources
 http://www.developmentseed.org/blog/2009/ju
  n/19/drush-more-beer-less-effort/
 http://www.only10types.com/2011/03/drush-
  backup-and-migrate-command.html
 http://www.slideshare.net/SergeiStryukov/dru
  sh-why-should-it-be-used
 http://drupal.org/node/484720
 http://drupal.org/node/670460

                   http://cavhost.com
Many Thanks!


   THANK YOU ALL!

    PRESENTED @
DRUPAL CAMP MANILA 2012
     FEB. 25, 2012



         http://cavhost.com

Drush for drupal website builder

  • 1.
  • 2.
    Who am I? Adolfo G. Nasol (danreb)  Website builder for 4 years but get hooked in drupal in the last 2 years and 41 weeks  Information and Communication Technology (ICT) student (June, 2012)  A product of (TVET) Technical Vocational Education and Training  Part time TVET Trainer http://cavhost.com
  • 3.
    Presenting DRUSH FOR DRUPALWEBSITE BUILDER http://cavhost.com
  • 4.
    What is notincluded?  Drush Installation  Using drush to synchronizes and deploy sites  Advance drush command like running arbitrary PHP script from drush http://cavhost.com
  • 5.
    What is Drush? Drushis a command line and 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. http://cavhost.com
  • 6.
    Drush is nota module Drush = Drupal + Shell + = DRUPAL + SHELL SCRIPTING = DRUSH http://cavhost.com
  • 7.
    Drush is atool Drush provides a way of executing commands and scripts on a Drupal installation through shell or command line interface on your web server http://cavhost.com
  • 8.
    Do I needto learn Drush? Q - I’m beginner, is drush for me too? A - Yes!, drush command is easy Q - What makes newbie nervous about drush? A - Drush is a command line program and worried of breaking their site. http://cavhost.com
  • 9.
    Do I needto learn Drush? Q – I think drush is only for developers? A – No!, If you manage a Drupal website, drush is something you should know! http://cavhost.com
  • 10.
    Why developers love Drush? Programmers hate work that is tedious and repetitive, drush can automate repetitive tasks.  Drush is written in PHP, they can easily extend drush if needed. http://cavhost.com
  • 11.
    What Drush cando that GUI can’t?  Save bunch of time! http://cavhost.com
  • 12.
    Why use drush? Use drush to keep your site up to date  One installation to rule all your drupal site on your server  A must tools for system admin  Easy to remember commands  Easiest way of updating drupal website, it can update core and modules in one command http://cavhost.com
  • 13.
    Other possible usesof drush  Manage modules  Manage users  Execute Drupal commands  Manipulate and extract site variables  Executes MySQL queries using drupal configuration http://cavhost.com
  • 14.
    Let start usingDrush! Drush Command Structure Command Options Arguments In shell just type – $ drush <command> [options] http://cavhost.com
  • 15.
    Drush Common Commands  dl - Downloads a module or theme  en - Enable module or theme  dis - Disable module or theme  cc - Clear the cache  cron - Runs all registered cron hooks  si - Do a complete drupal installation  sql-dump - performs mysqldump  st – Show basic information about a drupal site http://cavhost.com
  • 16.
    Drush Common Commands pm-list - Show list of extensions  wd-del - Delete watchdog messages  vget - Get a list of some or all variables  vset - set a variable  upd - Apply database update  up - Update Drupal core, modules, themes and performs database update  uli - Display one time login link http://cavhost.com
  • 17.
    Drush Common Commands ws - Show watchdog message  sql-cli - Open a SQL command-line interface using Drupal’s credential  help - To see all available command - example - $ drush help | more or just $ drush help http://cavhost.com
  • 18.
    Let’s see itin action! Time for demonstration Thanks! ADOLFO G. NASOL Blog: http://danreb.com Website: http://cavhost.com Drupal: http://drupal.org/user/547004 Mobile: +63 9195951276 Phone: (046) 8530347 http://cavhost.com
  • 19.
    Resources and UsefulLinks  http://drush.ws/resources  http://www.developmentseed.org/blog/2009/ju n/19/drush-more-beer-less-effort/  http://www.only10types.com/2011/03/drush- backup-and-migrate-command.html  http://www.slideshare.net/SergeiStryukov/dru sh-why-should-it-be-used  http://drupal.org/node/484720  http://drupal.org/node/670460 http://cavhost.com
  • 20.
    Many Thanks! THANK YOU ALL! PRESENTED @ DRUPAL CAMP MANILA 2012 FEB. 25, 2012 http://cavhost.com