Upgrading BeFused from Drupal 5 to 7

I have a confession to make. This site runs on Drupal 5! Back in its day, Drupal 5 was a great system. But it a far cry from what Drupal 7 now offers. I have plenty of experience upgrading sites from Drupal 5 to Drupal 6, but I want to take this all the way to Drupal 7.

Upgrade options

I have 2 main options:

  1. Follow the upgrade path
  2. Rebuild in Drupal 7 and migrate the data

If it were a Drupal 5 to 6, or Drupal 6 to 7 upgrade, I could normally recommend the first option. This is especially true if you want the site design and features to be status quo.

However, in this case, I want to rebuild the site anyway, because I built this site around 5 years ago and have made mistakes that I won't repeat. This is a good opportunity to start afresh. Also, a Drupal 5 to 7 upgrade would involve 2 upgrades - 5 to 6 and then 6 to 7. It is not a very complicated site (mainly just a blog), so the data migration should be fairly straight forward.

So for this one, I am going to take the second option and rebuild and migrate.

Migrating the data

I have a few options for migrating the data.

Migration module

The Migrate module is designed to migrate data from other sources into Drupal. For example, migrating from another CMS to Drupal. However, it should be very useful for a Drupal to Drupal migration as well.

Node Import

Node Import will import content from a CSV file and you can map to content type fields, taxonomy and users. So I could export content from this site as CSV and then use Node Import to import to the Drupal 7 site.

Feeds

The Feeds module imports content from a feed (RSS, Atom etc) and creates nodes, users and taxonomy terms. It also supports CSV, so has some overlap with Node Import. It is aimed more at aggregating content from other sites/sources on a regular basis, but can equally be used for a one off migration.

Script it

I could write a PHP script, or Drupal module, to grab the content from the Drupal 5 database, and then connect to the Drupal 7 database and insert it. If it were a Drupal 6 to 7 migration, I could use the Batch API to prevent PHP timeouts. However, the Batch API is not available in Drupal 5.

Stay tuned

Once the rebuild and migration is complete, I will write another post to outline the migration approach that I took and a tutorial on how to do it.

If you liked this, you'll love my book, Master Drupal Module Development.

"..the must have drupal developers book"


Feeling stuck with Drupal 8 module dev?

Get the free 7 lesson course that will help you get started today without feeling overwhelmed.

  • Create Drupal modules with just a few commands using the Drupal Console
  • Create custom pages
  • Create custom blocks
  • Create admin forms
  • Demystify routers and controllers
  • Bonus material

Find out more


Comments

Hej Blair, this article was a nice start when I was looking for solutions to migrate one of my sites from D5 to D7. Did you make any progress? I am really curious about your way to solve this task.
All the best - andreas

Blair Wadman's picture

Hi Andreas,

Yes, the migration to D7 is complete. In the end I used a custom module, adapted from a module that Nathan Haug wrote. Because BeFused doesn't have that many content types, it seemed like the best approach. Sorry I have written the follow up post yet, but I will do soon. In the mean time, check out Nathan's post: http://quicksketch.org/node/5739

Add new comment