Painlessly Migrate from Wordpress to Drupal

In this tutorial, you'll learn how to migrate content from Wordpress to Drupal.
Versions in use: Wordpress 3.3.2 & Drupal 7.12

Video Screencast

Step by Step Instructions

  1. Login to your Wordpress Admin
  • Navigate to Tools → Export
  • Download WXR File containing "All content"
  1. Make sure your XML file is valid using xmllint on the command line (Wordpress Migrate is particular about having valid XML)
  • xmllint comes preinstalled on OSX
  • Open terminal and type xmllint mywordpressexport.xml
  • All XML errors will be shown (line number and exact location)
  • Make appropriate fixes to the XML
  • If you run xmllint mywordpressexport.xml and the entire file prints to the screen, your XML is valid!
  1. Install the appropriate Drupal modules
  • Migrate - robust Drupal module for migrating all sorts of content
  • Wordpress Migrate - Migrate submodule that allows you to perform a Wordpress migration without writing code!
  • Migrate Extras - provides functionality to import clean URLs using Pathauto
  • Pathauto - provides functionality to have clean URLs in Drupal
  1. After logging into Drupal navigate to the Find Content screen & click the Wordpress Migration tab in the upper right
  2. Choose Import from a File
  • Select your valid XML file from your computer
  • If necessary, adjust import settings below
  • Choose immediate import method unless you have a really large dataset (they have options for using Drush for a "background" import)
  1. Migration Complete!
  • Navigate to Find Content to ensure your data was properly imported.

Caveats

  • Authors are not currently migrated
  • Wordpress images will still have the old path (this can be solved by doing a find and replace in your XML file before importing)
Drupal Planet Drupal

Read This Next