Upgrading to Drupal 7

  • 3,255 views
Uploaded on

Presentation at the NCTech4Good conference in Chapel Hill, NC on April 15, 2011. The presentation covers upgrading to Drupal 7 from Drupal 6 (or another system), and covers best practices, …

Presentation at the NCTech4Good conference in Chapel Hill, NC on April 15, 2011. The presentation covers upgrading to Drupal 7 from Drupal 6 (or another system), and covers best practices, recommendations. Update.php and migrate module are both discussed.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,255
On Slideshare
0
From Embeds
0
Number of Embeds
4

Actions

Shares
Downloads
0
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Upgrading to Drupal 7 NCTech4Good April 15, 2011 Kosta Harlan @dh_kostaNotes: Jay Roberts @dh_jay Developer @DesignHammerhttp://designhammer.com/blog http://designhammer.com 1
  • 2. A bit about us• DesignHammer is a web design and development firm based in Durham• We do Drupal• Themes, modules, information architecture, mobile, 3rd party integration 2
  • 3. What is Drupal 7? 3
  • 4. What is Drupal 7?• Powerful content management system• D7 has a great number of usability, performance, security, and API improvements• Drupal 7 currently used by NPR, The Examiner, Drupal Gardens 4
  • 5. Why you shouldn’tupgrade to Drupal 7 5
  • 6. Drupal is an eco-system• Modules• Themes• Install Profiles• People! 6
  • 7. Modules & Themes• Many important contributed modules (Nodewords) are not ported• Many others (Views) don’t have stable releases• Lots of others have major/critical bugs 7
  • 8. Modules & Themes6000450030001500 Drupal 6 Drupal 7 0 Modules Themes 8
  • 9. More reasons not to upgrade?• There are bugs in Drupal 7 (1 critical, 200 major, 800+ normal)• Upgrading is a major investment of time and resources• Drupal 6 still has at least 2-3 years of support 9
  • 10. Good reasons to upgrade• Preparing for an overhaul of your website structure / design• Currently running Drupal 5 or hacked core• Preparing for a presentation on how to upgrade Drupal 6 to Drupal 7! 10
  • 11. Let’s upgrade! 11
  • 12. Site inventory• Figure out what you have, what you need, and what you can get rid of.• Modules, themes, custom code• Configuration and content 12
  • 13. Module inventory admin/build/modules 13
  • 14. Use Drush http://drupal.org/project/drush• Drush is a command-line tool to interact with the Drupal shell• Essential for managing sites• drush site-upgrade @d7 14
  • 15. Drush inventorydrush pml --type=module --status=enabled --no-core 15
  • 16. drush pml --type=module --status=enabled --no-core--pipe 16
  • 17. Drush inventorydrush pml --type=module --status=enabled --no-core--package=designhammer 17
  • 18. Content type inventory 18
  • 19. Field inventory 19
  • 20. Theme inventory Won’t work in D7 20
  • 21. Theme work 21
  • 22. Other configuration• Views• Panels• Menu structure• Block placement 22
  • 23. Content inventory• Get to know your database•SHOW TABLES;•SELECT COUNT(*) FROM users;•SELECT COUNT(*) FROM node;• Use Views to help with content inventory 23
  • 24. Inventory complete? Not if you didn’t take lots of notes! 24
  • 25. Migration environments 25
  • 26. Development environments• Production (http://designhammer.com)• Staging (http://stage.designhammer.com)• Development (http://designhammer.local) 26
  • 27. Migration environments• Staging (http://d7stage.designhammer.com)• Development (http://dh7.local)• Don’t attempt an upgrade on your live site! 27
  • 28. Source control• We use Git• Branches for develop-7.x and master-7.x• Branches for features and issues 28
  • 29. Which migration path? How frequently is your site updated? 29
  • 30. Drupal’s update.php http://yoursite.org/update.php Pros Cons• Standard, community • The remaining 10% can supported upgrade path cause big headaches• Easy! • Field migration not quite there yet• Migrates configuration • No ability for ongoing data settings migration• Will get you 90% of the way there 30
  • 31. Migrate module http://drupal.org/project/migrate Pros Cons• Extremely flexible and • More complicated to set powerful up• Excellent for ongoing • Time consuming data migration • Not great for Drupal to• Integrates with issue Drupal migrations trackers • No configuration settings migrated 31
  • 32. Migrate module• Write code for each entity you want to import• Run imports and roll back• Supports pulling data from the production database 32
  • 33. Migrate module 33
  • 34. Migrate module 34
  • 35. 35
  • 36. Drupal 7 update.php• Follow the 18 step guide in UPGRADE.txt • Disable all modules, themes, set core theme• When you are done, download cck-3.x-dev and enable the content_migrate module• Start migrating your fields 36
  • 37. Data migrated! Now comes the hard work 37
  • 38. Configuration and code• Upgrade your theme(s)• Upgrade your custom code• Upgrade all your contributed modules• Reset your blocks & configuration settings• Report bugs and contribute patches! 38
  • 39. DesignHammer A Case Study 39
  • 40. DH Migration Path• We tried the standard update.php process, and failed• Tried Migrate module• Then went with the update.php process again 40
  • 41. Pain points• Converting the theme• Fixing broken Views• Resetting configuration (blocks, tokens, menu items)• Learning D7 from a migration process instead of starting fresh 41
  • 42. Conclusions• Plan carefully• Have a good reason to upgrade• Think about your migration path• Study D7 before attempting to upgrade to D7! 42
  • 43. Kosta Harlan Jay RobertsDevelopers @DesignHammer @dh_kosta @dh_jay www.designhammer.com 43