Migrating Wordpress into Drupal

 

I’m currently testing how to migrate a Wordpress site into Drupal using three of the modules available at the moment.  I’m looking to do a pretty quick migration and not have to muck about configuring modules.
 
The modules are:
 
Wordpress Migrate - http://drupal.org/project/wordpress_migrate - D7 only
Wordpress Import - http://drupal.org/project/wordpress_import - D6 only
WordPress XML for Feeds - http://drupal.org/project/wp_feeds - D6 only
 
The first item is examining the WP site in question.  
 
There are two basic content types in the site - Pages and Posts.  Pages in WP correspond to Pages in Drupal - somewhat obvious. And Posts in WP correspond to Story (D6) or Article (D7) in Drupal. For the site I am working on there were some items created as Pages that probably should have been Posts, so those were changed.
 
Wordpress also has two tagging system for Posts called Categories and Tags.  These are similar to Taxonomies in Drupal.  The site has mostly Categories and only two used Tags, so I’m not going to worry about the Tags much.
 
The site also has a number of Media items - pictures, PDF files, etc. There are also Users, Menus, Comments, and Widgets. Some ‘pages’ on the site are Widgets which basically operate like Views, for example, listing all the Users on an ‘Officers’ pages with their picture, bio, etc.
 
I’ve set up the Acquia Drupal stack to test the migration modules…  its handy for that.
 
WordPress XML for Feeds
 
This looked promising at the start, but I found one serious issue in that it did not seem to want to import the WP Pages which is somewhat important.  I may have messed something up, but could not find an obvious mistake.  
 
It did however point out the Caption Filter module - http://drupal.org/project/caption_filter - which will come in handy later.
 
Wordpress Import
 
This pretty much worked right off the bat.  I set up two taxonomies for the Tags and Categories in the WP site and made sure they were available to the Page and Story Content Types.
 
When you do an import, you need to specify which WP content type matches with a Drupal content type, how you want to map the users, and if to do an image transfer. It also creates a custom Input Format which only runs the URL filter. 
 
It seemed to work pretty well in terms of the content,comments, and taxonomies.  It does not import the site structure, so things like menus will need to be rebuilt.  The taxonomies were correctly assigned to the Story nodes and images were imported.  It would probably be necessary to examine every node to check that it rendered correctly however.
 
Wordpress Migrate
 
As I’m leaning towards running D7 for the new site, getting this module to work was high on my list. The module leverages the Migrate and Media modules, so you’ll need those too.
 
A few lessons learned for doing a few test imports.  
 
First, use the Full HTML format so images and other content render - this site had lots of iframes in it. 
 
Second, use the Caption Filter module to render the WP captions and make sure you add it to the Import Filters - don’t forget to add the Media Filter, too. 
 
You’ll also need to set up the D7 Taxonomies for each Content Type, I did not do this the first few tests.  And remember that Taxonomy for D7 is a field entity that you have to set for the Content Types. 
 
Once those were all set the import went pretty well.  Again, no structure was imported, so that will need to be rebuilt.  Each node will ned to be examined for issues which is not surprising.  I did see some external links back the original site which will need to be updated…  things like that.
 
Conclusion
 
So for doing a migration the Wordpress Import module is the way to go for D6 and Wordpress Migrate for D7.  Given that I just need to move the content, having to rebuild the site structure and fix some of the issues involving widgets and such is not a huge deal.