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.