Drush and drupal. администрирование. Волчек Михаил
Upcoming SlideShare
Loading in...5
×
 

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

on

  • 1,532 views

 

Statistics

Views

Total Views
1,532
Views on SlideShare
709
Embed Views
823

Actions

Likes
0
Downloads
9
Comments
0

2 Embeds 823

http://drupaler.ru 714
http://www.drupaler.ru 109

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

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
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

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

  • Drush and Drupal.Administration Michael Volchek Web-developer Drupal-club (Belarus) twitter: mikhail_volchek drupal-sliot.by
  • Спонсоры Организатор Генеральный спонсор Серебряный спонсор Серебряный спонсор Бронзовый спонсор Бронзовый спонсор
  • For whom?• Who wants to implement current updates rapidly• Who doesn’t 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)
  • Basic Commands• Drush <host> status• Drush dl <project_1> < project_2> < project_3>• the same with drush en/dis/pm-uninstall• Drush cc [all|menu|css-js…]• Drush help <some_command>• etc
  • Coworking Drush and Linux• For example:• drush dis pathauto && drush pm-uninstall pathauto && rm –rf pathauto• drush dl omega_tools && drush en omega_tools –y• drush pm-list | grep omega
  • New Modules - New Commands• For example:• drush omega-subtheme "Test theme" html5 --machine_name=test_theme && drush en test_theme -y && drush pm-list | grep test_theme
  • Install Drupal1. Prepare database (mysql>create database <DB_name>;)2. Use one drush command site-install (or alias si)• drush si standard --db- url=mysql://<DB_user>:<passwd>@<DB_host>/<DB_n ame> --db-su=<admin> -db-su-pw=<some_password> --site-name=‘Dev Site!’
  • Recover user’s passwordor how to crack Drupal usersUse•drush uli -l http://<somehost>or•drush upwd <user> --password=<password>
  • 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 -y•Wait for a moment•That’s all•It takes you about 5 minutes•Use the same command for contrib modules UPD
  • 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
  • Drush Updating• /usr/local/share/drush• cd /usr/local/share/• drush dl drush --destination=.• and use drush cc drush (clear drush cache)
  • qd command• Without VH, DB… ready Drupal profile• Sqlite issue• Server settings• Why to do it?
  • Alias• $aliases[dev] = array(root => /path/to/drupal, uri => dev.mydrupalsite.com, );• drush @dev status• $ drush --root=/path/to/drupal --uri=dev.mydrupalsite.com status
  • 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)
  • Git + cron + drush
  • 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)
  • Drush Hardships• To start using it. For window’s 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)
  • Conclusion• Use open source software• Commands shell – more health-given for your fingers =)• It saves your time!
  • 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
  • Thanks Michael Volchek Drupal Club (Belarus) skype: fannrmus twitter: mikhail_volchek
  • Спонсоры Организатор Генеральный спонсор Серебряный спонсор Серебряный спонсор Бронзовый спонсор Бронзовый спонсор