Drush and drupal. администрирование. Волчек Михаил

  • Published on

  • View

  • Download

Embed Size (px)




<ul><li> 1. Drush and Drupal.Administration Michael Volchek Web-developer Drupal-club (Belarus) twitter: mikhail_volchek drupal-sliot.by </li> <li> 2. </li> <li> 3. For whom? Who wants to implement current updates rapidly Who doesnt like to do the same actions again and again Who chooses Linux hosting Who likes shell (drupal+shell=drush) And it is comfortable for local developing (deployment, supporting, migration, backup) </li> <li> 4. Basic Commands Drush status Drush dl &lt; project_2&gt; &lt; project_3&gt; the same with drush en/dis/pm-uninstall Drush cc [all|menu|css-js] Drush help etc </li> <li> 5. Coworking Drush and Linux For example: drush dis pathauto &amp;&amp; drush pm-uninstall pathauto &amp;&amp; rm rf pathauto drush dl omega_tools &amp;&amp; drush en omega_tools y drush pm-list | grep omega </li> <li> 6. New Modules - New Commands For example: drush omega-subtheme "Test theme" html5 --machine_name=test_theme &amp;&amp; drush en test_theme -y &amp;&amp; drush pm-list | grep test_theme </li> <li> 7. Install Drupal1. Prepare database (mysql&gt;create database ;)2. Use one drush command site-install (or alias si) drush si standard --db- url=mysql://:@/ --db-su= -db-su-pw= --site-name=Dev Site! </li> <li> 8. Recover users passwordor how to crack Drupal usersUsedrush uli -l http://ordrush upwd --password=</li> <li> 9. Minor Drupal Updating7.10 to 7.141.!Backup! Project DataBase and Files /.htaccess and robots.txt2.Move from project all custom files/folders3.Switch on update module4.drush upc / up -yWait for a momentThats allIt takes you about 5 minutesUse the same command for contrib modules UPD </li> <li> 10. Major updating faced with Contributed module developing (for example: /project/photos last update - 2009-Dec-30) But it needs to migrate about 150 albums and 6000 photos If you still hardcode (or hook) contributed modules Need to rewrite custom themes </li> <li> 11. Drush Updating /usr/local/share/drush cd /usr/local/share/ drush dl drush --destination=. and use drush cc drush (clear drush cache) </li> <li> 12. qd command Without VH, DB ready Drupal profile Sqlite issue Server settings Why to do it? </li> <li> 13. Alias $aliases[dev] = array(root =&gt; /path/to/drupal, uri =&gt; dev.mydrupalsite.com, ); drush @dev status $ drush --root=/path/to/drupal --uri=dev.mydrupalsite.com status </li> <li> 14. Git + cron + drush GitHub.com is our basic repo Use script files (*.sh) Use git command (for example: git pull) there Use drush command there (sql-dump or cc all) And cron schedule (crontab -e) </li> <li> 15. Git + cron + drush </li> <li> 16. Drush in windows Windows installer from 5.x version To install with online connection (required pecl library) Additional mysql software tuning (for example drush sql- dump) </li> <li> 17. Drush Hardships To start using it. For windows and click-mouse funs it may be a psychological issue Thats not the game for share hosting More flexible and usable in Linux platform. At the beginning you need to learn a list of popular commands. U can print it and stick to wall. Update modules issue in distributives (for example, OpenAtrium) </li> <li> 18. Conclusion Use open source software Commands shell more health-given for your fingers =) It saves your time! </li> <li> 19. Useful links drush.ws - documentation http://igusev.ru/drupal/omega/omega-drush-subtheme-creation - use with omega http://www.summasolutions.net/blogposts/implementing-drush- commands - write your own commands http://civicactions.com/team/owen_barton - interesting screencasts </li> <li> 20. Thanks Michael Volchek Drupal Club (Belarus) skype: fannrmus twitter: mikhail_volchek </li> <li> 21. </li> </ul>


View more >