• Like
  • Save

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Drush - for zero to hero

on

  • 4,908 views

This is a mashup from following slideshare presentations.

This is a mashup from following slideshare presentations.

http://www.slideshare.net/buk0wsk1/drush-more-beer-less-effort
http://www.slideshare.net/jdschroeder/drush-5186087

Statistics

Views

Total Views
4,908
Views on SlideShare
4,864
Embed Views
44

Actions

Likes
12
Downloads
124
Comments
1

6 Embeds 44

https://jujo00obo2o234ungd3t8qjfcjrs3o6k-a-sites-opensocial.googleusercontent.com 14
http://jimatic.blogspot.com 13
http://www.penghou.net 10
http://www.wunderkraut.com 3
http://wunderkraut.com 2
http://ericope.com 2

Accessibility

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • The            setup            in            the            video            no            longer            works.           
    And            all            other            links            in            comment            are            fake            too.           
    But            luckily,            we            found            a            working            one            here (copy paste link in browser) :            www.goo.gl/yT1SNP
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Drush - for zero to hero Drush - for zero to hero Presentation Transcript

    • Drush More Beer Less Effort
    • Drush More Beer, Less Effort Credits http://www.slideshare.net/ * buk0wsk1/drush-more-beer-less-effort * jdschroeder/drush-5186087
    • Drush More Beer, Less Effort Drush More Beer, Less Effort General assumptions Who will get the most out of this presentation: * You are reasonably comfortable using command-line utilities. * You know the general concepts of Drupal. * See what Drush can do and how to use it.
    • Drush More Beer, Less Effort Overview * What * Install * Basic & Advanced Commands * Configuration * Extending Drush
    • Drush More Beer, Less Effort What?
    • Drush More Beer, Less Effort Drush More Beer, Less Effort What is Drush? * Dru pal sh ell * Not a module * Collection of scripts that allow you to perform Drupal tasks from the command line on your web server.
    • Drush More Beer, Less Effort Drush More Beer, Less Effort Why care? * You spend more time on Cmd * Less clicking – more scripting * Keep up to date
    • Drush More Beer, Less Effort Drush More Beer, Less Effort Drush knows ... * What site you're working on * What version of drupal you use * How to connect to your DB
    • Drush More Beer, Less Effort Drush More Beer, Less Effort Requirements * Run along side your installations * Could even work remotely * Requires commandline access 2 PHP
    • Drush More Beer, Less Effort Install
    • Drush More Beer, Less Effort http://www.drupal.org/project/drush Drush More Beer, Less Effort Install Browse Drush Project Web Site
    • Drush More Beer, Less Effort wget http://ftp.drupal.org/files/projects/drush-6.x-3.3.tar.gz Install Download Latest Drush Package Latest = Oct 27, 2010
    • Drush More Beer, Less Effort tar xvzf drush-6.x-3.3.tar.gz Install Uncompress Drush Package
    • Drush More Beer, Less Effort ln -s /path/to/drush/drush.php /usr/bin/drush Install Create symbolic link to Drush Script
    • Drush More Beer, Less Effort # set PATH so it includes drush if it exists if [ -d "$HOME/workspace/drush" ] ; then PATH="$HOME/workspace/drush:$PATH" fi Alterative Install Add drush folder to $PATH in ~/.profile file
    • Drush More Beer, Less Effort vim /etc/php5/cli/php.ini Install max_execution_time = 90 max_input_time = 180 max_input_nesting_level = 64 memory_limit = 256M
    • Drush More Beer, Less Effort Configuration * Global and site specific drushrc.php * Configures path locations, site aliases, checkout handling, database dump options, command-specific options, and variable overrides. * example.drushrc.php is included.
    • Drush More Beer, Less Effort Basic Commands
    • Drush More Beer, Less Effort Disclaimer * Not all commands are available to all Drupal versions. * site-install requires Drupal 7, several other commands require at least Drupal 6.
    • Drush More Beer, Less Effort cd /var/www/drupal/sites/sitename Basic Commands Go to your site directory
    • Drush More Beer, Less Effort drush help Basic Commands Show information about drush sysntax
    • Drush More Beer, Less Effort drush help <command> Basic Commands Show command-specific information
    • Drush More Beer, Less Effort drush st Basic Commands Show some useful information about your site and server configuration
    • Drush More Beer, Less Effort drush sm Basic Commands Show a list of available modules and themes
    • Drush More Beer, Less Effort drush pm-info <project> ... Basic Commands Show detailed info about projects
    • Drush More Beer, Less Effort drush pm-releases <project> ... Basic Commands Show all releases about a project (module, theme, profile, translation)
    • Drush More Beer, Less Effort drush dl <project> <project>... Basic Commands Download Drupal Core, modules, themes, profiles, translations to a site specific directory or default site directory
    • Drush More Beer, Less Effort drush en <project> <project>... Basic Commands Enable modules and themes and it's dependant modules as well
    • Drush More Beer, Less Effort drush dis <project> <project>... Basic Commands Disable modules and themes and it's dependant modules as well
    • Drush More Beer, Less Effort drush pm-uninstall <project>... Basic Commands Uninstall modules and themes (Must disable before uninstall them)
    • Drush More Beer, Less Effort Advanced Commands
    • Drush More Beer, Less Effort drush cron Advanced Commands Run all cron hooks in all active modules
    • Drush More Beer, Less Effort drush cc Advanced Commands Delete specific Drupal cache or all caches
    • Drush More Beer, Less Effort drush updb Advanced Commands Run update.php script as a web browser
    • Drush More Beer, Less Effort drush up Advanced Commands Display available update information and allow updating of all installed projects to the specified version
    • Drush More Beer, Less Effort drush upc Advanced Commands Display available update information and allow updating of all installed project code to the specified version
    • Drush More Beer, Less Effort drush eval ”php code” Advanced Commands Run php code in the context of Drupal
    • Drush More Beer, Less Effort Drush SQL Commands
    • Drush More Beer, Less Effort drush sql-conf Drush SQL Commands Show database connection details
    • Drush More Beer, Less Effort drush sql-connect Drush SQL Commands Database connection string
    • Drush More Beer, Less Effort drush sqlq ”query” Drush SQL Commands Execute query against the site database
    • Drush More Beer, Less Effort drush sqlc Drush SQL Commands Open a SQL command-line interface using Drupal's credentials
    • Drush More Beer, Less Effort drush sql-dump Drush SQL Commands Exports the Drupal database using mysqldump
    • Drush More Beer, Less Effort Drush Shell Commands
    • Drush More Beer, Less Effort drush cli Drush Shell Commands Enter a new shell optimized for drush use CTRL+D for Exit
    • Drush More Beer, Less Effort drush> cdd Drush Shell Commands Navigate to your Drupal root directory
    • Drush More Beer, Less Effort drush> sa Drush Shell Commands List all alias records known to Drush
    • Drush More Beer, Less Effort drush> on @alias <command> Drush Shell Commands Executes command on @alias site
    • Drush More Beer, Less Effort Drush Log Messages
    • Drush More Beer, Less Effort drush wd-show Drush Log Messages Show watchdog messages
    • Drush More Beer, Less Effort drush wd-list Drush Log Messages Show available message types and severity levels
    • Drush More Beer, Less Effort drush wd-del Drush Log Messages Delete watchdog messages
    • Drush More Beer, Less Effort Third Party Commands
    • Drush More Beer, Less Effort Devel module Third Party Commands Some third party modules provide more Drush commands that become available automatically
    • Drush More Beer, Less Effort drush genc <nodes> <max-comments> Third Party Commands Generate nodes and comments automatically
    • Drush More Beer, Less Effort drush gent <vid> <num-terms> Third Party Commands Generate taxonomy terms for a given vocabulary
    • Drush More Beer, Less Effort drush genu <num-users> Third Party Commands Generate user accounts
    • Drush More Beer, Less Effort Features Third Party Commands features-diff, features-export, features-list, features-revert, features-revert-all, features-update, features-update-all
    • Drush More Beer, Less Effort drush gent <vid> <num-terms> Third Party Commands Generate taxonomy terms for a given vocabulary
    • Drush More Beer, Less Effort To the extreme
    • Drush More Beer, Less Effort Drush Make * Create a ready-made Drupal site from the command-line. * Useful for distributing installation profiles.
    • Drush More Beer, Less Effort Drush Make * unpack in ~/.drush * drush make [options]
    • Drush More Beer, Less Effort Drush Make Demo * run ./build.sh * [thank you Davy Van Den Bremt]
    • Drush More Beer, Less Effort Deployment Example
    • Drush More Beer, Less Effort Deployment Example
    • Drush More Beer, Less Effort Site Aliasing $options['site-aliases']['remote_site'] = array( 'uri' => 'myremotesite.com', 'root' => '/var/www/html/remotesite.com', 'db-url' => 'mysql://username:password@localhost/database', 'remote-host' => 'myremotesite.com', 'remote-user' => 'user_deploy', 'path-aliases' => array( '!drush' => '/usr/local/bin/drush', '!drush-script' => '/usr/local/bin/drush/drush', '!files' => 'sites/default/files', ), );
    • Drush More Beer, Less Effort Syncing files and data $ drush rsync sites/default remote_site:sites $ drush sql-sync development remote_site
    • Drush More Beer, Less Effort Questions?