How to Migrate from Drupal 7 to WordPress 4

By January 29, 2015#Tech

Over the past couple of weeks I tackled a project a little beyond me. I needed to move a site from Drupal 7 to WordPress 4.I’m very familiar with WordPress, but Drupal was completely new to me.  It was difficult to find anything initially that helped. Most of the searches led to pages years old or to MySQL tutorials a bit too complex for a novice like me.  A few friends and the original developers hadn’t attempted it before either. There were a few services that would do it for a fee, but I was hoping to get it done for free.

I finally came across a winning result thanks to Liran Tal and his Drupal2Wordpress php code. The advantage of his solution is that you don’t need to mess with MySQL commands because everything is built into the php file.

Following his instructions, there were some prerequisites to pulling this off. My WordPress install had to be new (no content) and both databases needed to be on the same server. I got my hands on a MySQL dump (backup) of the Drupal database and the site images and files. Once I had that, I was able to upload the MySQL zip file with the Drupal database via phpMyAdmin hosted on the same server.

Once both databases were on the same server, I downloaded the migration script from Github and modified it following Liran’s instructions on his Udemy tutorial. I’ll stop here because Liran explains it better than me on his tutorial and believe me, it’s well worth the $10. Considering most migration services were hundreds of dollars, spending the $10 on the course and directing readers there is the least I could do to thank him for his efforts.

A couple of thoughts regarding the migration…

  • The 900+ posts, 10+ pages, and 70+ users migrated in less than 1 second. It migrated post titles, content, authors, timestamps, and approved comments. The Drupal “categories” ended up as tags, but that wasn’t too difficult to clean up with WordPress bulk editing. Page and post urls were a bit messed up once I changed WordPress permalinks to the postname and required some clean up.
  • We had to have a team party to connect images to posts. We used the image file name to quickly search within the media library to set the featured image for each posts. Between 4 of us it took about 4 hours to go through 400 posts with images.
  • Users were pulled in without roles, so we’ve had to go through each of them and assign them roles and passwords.

It hasn’t been easy, but it would have been a nightmare without the Dupal2Wordpress php script. There was no better solution that I could find to pull it off without a paid service.

Author Matt

I'm a husband, father, leader, and geek whose time is wrapped up in faith, family, film, and travel. I guess I'm a little like the equivalent of a utility player in baseball. I'm happy with not being the best at something as long as I'm always trying to get better.

More posts by Matt

Join the discussion 2 Comments

  • Liran Tal says:

    I’m so happy it helped!
    And the scale of your migration is amazing, migrating 900 posts and almost 100 users. I used it personally to simply migrate a 50’ish blog posts on my previous Drupal 7 blog 🙂

    By the way, I’d love updating the script to support the issues you mentioned, such as user roles, or other bugs.
    You’re welcome to open issues on the Github project and we can take it from there to co-ordinate and fix.

    Have fun!

  • Carry Blake says:

    I would strongly recommend following this tut Works seamlessly and trouble-free.

Leave a Reply