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.
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Upgrading to Drupal 7
1. Upgrading to Drupal 7
NCTech4Good
April 15, 2011
Kosta Harlan @dh_kosta
Notes: Jay Roberts @dh_jay
Developer @DesignHammer
http://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
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
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
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
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
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
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
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
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
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
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
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 Roberts
Developers @DesignHammer
@dh_kosta @dh_jay
www.designhammer.com
43