Upgrading Drupal 6 to Drupal 7

Wednesday, December 10, 2014



UA Web Branding aka UA Digital: External Relations has delivered annotated PSDs for College and Department level sites to the group. The Digital Assets working group has begun creating reusable assets based on the PSDs. The UX and Implementation working groups have created a survey to gather information on audiences and high-level use cases for all UA websites. The survey is currently being tested by members of the UA Digital group and will be distributed broadly across campus in January.

Website awards are postponed until January. Voting will be done using ranked-order voting.

Q & A

Q: Does anyone know of any outside developers they could recommend?
A: There is a contracted vendors list of developers on the UITS website: http://uits.arizona.edu/services/web-services/vendors. The Web and Mobile Services team also offers design and implementation services: http://uits.arizona.edu/services/website-design-implementation-services. You can also contact Biomedical Communications about the project and get a quote from them.


December is the month for Co-chair and Website Developer elections. Both incumbents were running again (Matt Harmon for Co-chair and Jonathan Santos for Website Developer). There being no other nominations, both incumbents were re-elected.

Upgrading Drupal 6 to Drupal 7

Speaker: Margrit Mcintosh, Biomedical Communications

Speaker’s notes with more information and links to modules and other resources can be found at http://uaweb.arizona.edu/upgrade-drupal-6-drupal-7-notes

Probably sometime in 2015 there will be a production release of Drupal 8 and soon after that support for Drupal 6 will end. (It may be a few minor releases after but that’s not finally decided yet.) Sites will still work but there will be no security updates.  So it’s time to begin thinking about it.

Biomedical Communications has not begun systematically upgrading sites but I have upgraded some sites at client request.

First: install Upgrade status. It creates an upgrade status report with a list of which D6 modules installed and if those modules are available in D7. In cases where the report says “no available releases” there is probably an alternative, maybe a better one. Custom modules will have to be re-written for 7 and that may or may not be difficult.

Don’t run the upgrade script on a production site. Start with cloned D6 site or set up new fresh D7 site. Generally the process is to disable any custom theme, enable a default theme, and run the upgrade script. All fields on custom content types must be mapped from the old site to the new site. In my experience things can be kind of buggy doing it this way. But if you don’t have any custom content types it should be smooth. (From Mike Hagedon: Reportedly the UA Libraries have used the Drush upgrade script and got good results. Ginger Bidwell would be a contact for more information about that.)

There is a Migrate module but it’s basically an API and will require programming.

Starting with a fresh site using Views Data Export and Feeds importers has worked well for me. You use Views Data Export to create an XML feed for each of your content types. Be sure to look at the feed created by Views Data Export: you don’t always want all of the HTML markup that will be included by default. The UUID module is used to make sure each item exported has a unique ID.

You will need to think about how to handle content updates that get made on the old and new sites during migration.

When setting up your views for export you need to be sure date fields have the correct date format. Rewrite links to full URLs for new site.

For multi-valued fields, group values together in Views to create a delimited string. Use Feeds Tamper when creating the Feeds importer to explode the string into an array. You can also use Feeds Tamper plugin String to Unix Timestamp to fix problems with dates.

Some fields can be difficult to import e.g. existing entity references or node references. Views Bulk Operations can help cleaning things up after import. You can use it to create a view where you select nodes individually and then perform actions on them.

If you are manually migrating images node by node, FileField Sources will provide an option to ”Use remote URL as source” so you don’t need to download images to a local hard drive.

If you zip up files folder from old site and put it in new site, paths remain the same. Just be careful if you have existing files on new site.

Q & A

Q: Starting from scratch seems really tedious. How buggy is it when you use the upgrade script?
A: It’s not that it’s terribly buggy. But I’ve seen cases where the database larger than it should have been and other odd things. In any case, you’ll still have map fields manually. Go ahead and try using script first and you don’t like what you get, then start from scratch. Have people use the site for a few days after you run the script to see if they notice anything funny. Also, I haven’t talked about theming and you can’t upgrade your theme using a script. Other things like image styles also have to be done manually either way. Using the Feeds importer to populate a fresh D7 site requires a bit of a learning curve but it works great and can be very quick once you get the hang of it. I’ve been able to migrate sites in just a few days.

Q: We’re using a UA D6 theme is there a UA D7 theme?
A: No.

Q: How different are things on D6 vs D7.
A: D8 is very, very different than 7. But 7’s not really that different from 6. 7 does take some getting used to . For example, things on the administration menu were moved around so it can be hard to find things at first.

Q: Will there be a upgrade path (module/script) for going from D7 to D8?
A: They are working on it but it’s not very far along.