Upgrade from Drupal 6 to 7, how hard is it?

Drupal upgrade still a bit rocky

Update - May 2012

One year have past since I wrote this article. Upgrading these days from Drupal 6 to 7 is certainly easier, safer and a lot less nerve wrecking, though I never think it will be a cakewalk.

I still have a few more complex sites running on Drupal 6. Knowing these sites and their complexity and all the custom glue code created, I also know that a direct upgrade will be hard. Complex sites like those are prob. easier upgraded by only migrating the content.
- Do a minimum clean Drupal 7 install.
- Build basic needed content types and config.
- Recreate the theme in D7 or port you existing.

Then migrate your content. Check out http://drupal.org/project/feeds or for even more flexibility and power http://drupal.org/project/migrate. I'll promice do a writeup of a more complex drupal 6 to 7 migration as soon as my remaining sites are running Drupal 7.

Background

This site have been upgraded from Drupal 6 to 7 and I have more site migration is the work at the moment. Upgrading is, still as I'm writing this, a rocky ride with a few sharp corners. For the one that have been with us since Drupal 5 and have some wage memories from back then we started migrating from 5 to 6, all this sound painfully familiar.

First thing first you need to understand. Drupal core it self migrate just perfectly from 6 to 7 so if you are running a super small/simple installation the upgrade it self should be a breeze. Pleas take the time and read the short but concise UPGRADE.txt located in your Drupal root directory and make sure you understand it before attempting to upgrade.

The tricky part of the upgrade is getting all the extra modules you have installed upgraded. The fewer modules your site is using, the simpler your upgrade path will be. So before you begin, make sure your site uses only modules it REALLY need, and make sure you properly uninstall the modules you decide you not really need to make sure the database is as clean as possible.

Drupal 7 almost 3 years of development provided the core developers a lot of time to include awesome stuff, but also modules. Daniel wrote this post a while back http://www.unleashedmind.com/en/blog/sun/more-than-50-drupal-modules-mov... that is worth a read. It is important to understand how this will affect your upgrade path. The general rule of thumb is. Modules that get included into core is still responsible for providing an upgrade path of the config and user-data, not Drupal core is self.

A good example of this is http://drupal.org/project/cck. got moved into the Drupal 7 core, but core it self does not migrate any of the CCK fields to Drupal 7 core field during the 6 to 7 upgrade. This have to be performed by CCK it self, so you still need CCK to install CCK in Drupal 7. At least to perform the migration of the fields.

Larger sites is naturally more complicated to migrate, and require quite some work reading up on the different project pages and issues and coming up this a battle plan. I find that we are in better shape then back when we moved from Drupal 5 to 6, but there still projects dragging their feet's and have not provided a 7.x branch or/and a migration path. Look in the project issue queue for Drupal 7 port related titles and join the conversation, or even better help out the maintainer(s) with your beautiful hand crafted code.

Changes in D7 architecture will force some modules to die or to change into newer projects. Here is a few places a lot of things are changing and it is worth investing some time reading about:

Comments

thanks man. i had basically no problems with core updates. the fun began with migration of cck and some other small modules errors in update hooks. finally i ended up doing manual work with the cck part. especially with list fields that got the wrong keys in the db (after cck migrate). ashok, i would use xdebug to stop at these lines and analyze the arrays.

Same problem here. CCK's are almost impossible to migrate. Even with the help of the migrate module. I feel reluctant to continue migrating as I might face the same issues going forward to Drupal 8. I hate to ditch drupal as it provides me with extremely powerful options, but migrating a site is proving to be hell.

I revisited 6 -> 7 migration a few weeks ago. An quite simple site and as suspected everything just worked. No special preparations. That been sad, I was a rather simple site. Migrations between 5->6 was never that hard, that's true. 6->7 have been a more hairy experience. Can you tell me more about what type of fields you are having problem with migrating?

Hi, I had problems with text_textfield widgets which contained lots of text, the migration failed while trying to squeeze it into (i think) a varchar. Converting this to text_textarea widgets before migrating solved that problem. Another problem were multiple-values cck fields without key|value pairs eg: 001:label1. The migration module created these key|value pairs in the widget settings field (content_node_field_instance, widget_settings), but failed to update the relevant cck fields: e.g table: content_field_yourfieldname field:field_yourfieldname_value. In this field I had to change the label to to the correct key as specified in table content_node_field_instance, field widget_settings for the cck field in question. I had to repeat this for table: field_data_field_yourfieldname with field: yourfieldname for every cck widget. I hope this makes sense :-) Anyway, I'm glad I figured things out and hope the next upgrade will be less of a pain. I guess every CMS has it strengths and weaknesses, updating isn't drupals strength, perhaps due to it's powerful feature set. Regards, Arend

Hi, I am developing elearning website for that i required module like open meeting but i am using drupal 7. Is this possible to convert drupal 6 open meeting module to drupal 7. Thanks in advance

I'm afraid I have not heard of it, you have the URL to the module project page? With more then 19 000 project on drupal.org there no way knowing them all ;)

I upgraded drupal 6 site to drupal 7. Now when I am trying to login i am not able to login. Site is redirecting to https mode. My site is not working under HTTPS. Only login and Sighnup pages are redirecting to HTTPS mode. I am able to access other pages and not redirecting to https. Any Idea.

And where is that redirect coming from? Perhaps you have some old settings in settings.php. This is not default D7 so you have some custom config. Grab your code and test it locally in you private sandbox. That will eliminate any webserver rewrites/redirects.

Add new comment