Painlessly Migrate from Wordpress to Drupal

Joel Steidl

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

Painlessly Migrate from Wordpress to Drupal from Aten Design Group on Vimeo.

Step by Step Instructions

  1. Login to your Wordpress Admin
    • Navigate to Tools → Export
    • Download WXR File containing "All content"
  2. 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!
  3. 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
  4. After logging into Drupal navigate to the Find Content screen & click the Wordpress Migration tab in the upper right
  5. 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)
  6. 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)

About the Author

Joel excels at making complicated problems simple by organizing and planning. Nothing brings him more joy than making sense out of a mess.

Read More