Want to contact me by voice?
(720) 254-1546

Importing Blogger Content to Drupal Using Wordpress

When I first started blogging in 2004 I signed up for a Blogger account to get on this blogging bandwagon.  We secured dogstar.org in the late 90’s and ran a small site on an LC III running Quid Pro Quo from a shared Ethernet connection in the Blacksburg Electronic Village.  I wasn’t blogging at that point-but I was writing about my thesis work and posting it to the site.  If you are interested in how dreadful the site looked back then, try looking on the WayBackMachine.  I actively blogged on blogger between 2004-2006 when I started playing with Drupal.  I cross posted for a time and then pretty much abandoned my Blogger account until I started using ping.fm.  ping.fm became a way for me to “store” all my tweets and generated 1000’s of individual posts.

A couple of days ago I decided I wanted the pertinent blog posts from my blogger account moved to my Drupal site.  Some searching revealed that there didn’t seem to be an import module written for that particular task.  However, Wordpress has an import from Blogger and there is a Wordpress import module for Drupal.  It was suggested on Drupal.org that one could import data to Wordpress and then to Drupal.  I figured I could use Wordpress to scrub the data (I needed to remove all the cross posts, delete all the tweets, and check for broken images) and then import to Drupal.

Here’s the process I went through to import to Drupal 6.

  1. Head to Wordpress.com and register yourself an account.  It takes about three minutes to set up. 
  2. Next you’ll need to create a blog.  Give you won’t be using the account for a public presence, uncheck the privacy check box.  You’ll need to choose a domain and a blog title as well.  
    Blogger to Drupal Data Migration
  3. Wordpress creates a sample post, page, and comment on the site.  By deleting the post and page you will have a clean slate to work with.
    Blogger to Drupal Data Migration
  4. Log into your Blogger account in another browser window.  This is important because the next set of steps will allow Wordpress to import the data from Blogger.  You can minimize the window at this point. 
  5. Return to Wordpress and find the Tools menu on the left side.
  6. Click on Tools.
    Blogger to Drupal Data Migration
  7. From the Tools menu, choose Import.
  8. You will be offered a menu of several different blogging platforms.  Click Blogger.
  9. Click Authorize
  10. Click “Grant Access”.  From Grant Access you will be asked on Blogger to authorize Wordpress as a trusted resource.  When you grant access, you’ll find yourself back on Wordpress.
  11. Click Import at this point.  This will initiate the transfer of data.  I had nearly 2300 posts to move over – be patient, it will take some time for the transfer to complete.
    Blogger to Drupal Data Migration
  12. At this point you can clean your data.  In my case I reduced the number of posts to transfer by roughly 2000 – some were cross posts from the end of my time really blogging on Blogger but most were from Twitter.  I also started looking through the posts for old broken images.  I fixed those where I could.  At this point I discovered that Wordpress doesn’t support REVVER and that I couldn’t re-embed my REVVER videos.  No worries, I decided I’d take care of that after I finished the initial import.
  13. Once you have finished cleaning your data, you’ll need to click on tools again.
  14. This time choose export.
  15. Click on Download Export File.
    Blogger to Drupal Data Migration
  16. This will download a file that reads something like wordpress.2009-06-13.xml
  17. At this point you are done with Wordpress.

At this point you are done with Wordpress.  You have your cleaned xml file that will be imported into Drupal.  You need two modules to complete the import process – trackback and wordpress-import.  Here are the next steps.

  1. Download Trackback http://drupalmodules.com/module/trackback
  2. Download Wordpress Import http://drupalmodules.com/module/wordpress-import
  3. Backup your Drupal Database.  If something goes wrong, you’ll be glad you did.
  4. FTP the two modules into your sites/all/modules directory.
  5. Log in as UID1.
  6. Enable trackback and the wordpress import modules.
  7. Go to /admin/content/wordpress_import
    Blogger to Drupal Data Migration
  8. Choose upload a file – click next
  9. Click “Choose File”.
  10. Navigate to the xml file you created in Wordpress and choose it.
  11. Click next.
  12. Map the WP user to the Drupal user you want to show as the author– the users will show up in a pulldown. 
  13. Choose whether to import as story nodes or blog nodes.  This site is a blog, so I chose blog.
    Blogger to Drupal Data Migration
  14. Click Next

At this point the import will begin and eventually you will be offered a message that verifies the number of posts and comments that were imported into the site.  You’ll want to run cron a few times to index your new content.  You can see the status of your indexing at /admin/settings/search

My next steps will be to replace all the missing REVVER embeds, but the job is largely done.

Comments

Thank you so much. As a WordPress supporter I would have expected that Import/Export via XML will be so easy.. even with Drupal. ;-)

Best Regards from Twitter Trends Germany.

There's also the wp2drupal module which imports straight off the WP database.

Damien

Thanks for the input! The first line seems to indicate you need to start with a clean install of Drupal. Will it work on a site that already has lots of content?