Select Page

Years ago I set up a personal website using the content management system (CMS) Drupal, in part to evaluate Drupal.  While I was happy in general with Drupal, it had some issues.  I also have set up many WordPress sites and believe that WordPress is much easier to maintain and update.  So I recently decided to migrate all of my Drupal content to WordPress.

There are a lot of things to consider when migrating.  It turns out that migrating the content, as opposed to the design, is pretty simple.  Fortunately I did not care if the overall design, the look and feel, of the site stayed the same.  If you need to keep the look and feel the same then you probably need to hire out the work to an agency (like ours) because you will likely have to do some WordPress theme customization.

So knowing that the main task I wanted to do was simply get the content migrated, I did what most of you would do, I started with a Google search.

The search results broke down into three broad categories:

  • Services that would do the migration for you (for  a price)
  • Tools to help you do the migration (basically database scripts)
  • Instructions on how to use database commands and which tables to copy (down and dirty)

I first looked at a service called CMS2CMS which promised to transfer between many different CMS’s.  It looked very promising and offered a limited demonstration.  But when I tried their demo it failed without giving me a helpful explanation of why.  Part of their transfer process involved downloading some PHP scripts to the server hosting Drupal.  I looked at those scripts and found some comments that indicated the issue might be with file and folder permissions, but even after making some permission changes, the failure still occurred. 

CMS2CMS support staff offered to help but they wanted FTP access to the server and I wasn’t ready to give that access, and also I wasn’t ready to pay to transfer the content. So I moved on the the second bullet.

Here I got lucky.  The first tool I looked at was from a company called “Another Cup of Coffee”.    As their website says “This Drupal to WordPress migration script exports the bulk of the content from Drupal 6 to WordPress 3.5. It runs a series of MySQL queries to read information from a Drupal database and convert the content to WordPress”.

Installation of the tool involved going to the GitHub site and downloading a folder to my Drupal site.  Following the terse instructions in the ReadMe.txt file in the folder, I opened and ran the drupaltowordpress.php script.  Following the on-screen instructions I pointed the script to the Drupal and WordPress sites.  The script first analyzed my Drupal site, then gave me some options to specify which Drupal content migrated to WordPress pages and which content to WordPress posts. 

drupal2wordpress

Note in the screenshot above that the tool says WordPress 3.5.  I used it to migrate to version 4.3.1 with no problems.

The screenshot below shows the results of the tool analyzing my Drupal site:

drupalanalyze

After setting the options, I clicked the migrate now button and it was done.  I had the content in WordPress.

drupalsettings

drupaldone

Note that the script expects an empty WordPress site (fresh install of WordPress) with the standard database prefix of wp_.  I had installed WordPress with a custom prefix and that caused the script to fail.  I simply changed the prefix in the wp-config.php file back to the default and re-installed WordPress with the famous WordPress 5 minute installation (which took me about 1 minute).

The biggest issue now was that all of the images in the content still pointed to where they lived when in Drupal.  The images were not migrated into the WordPress media library.  So I went back to Google searching for tools that would help.  I found one that looked promising, it would copy images hosted on external locations into the media library.  The plugin scanned your content for image links starting with http:, which indicate external links.  Unfortunately the image links in my content were pointing to files on the server that hosted the CMS so they were all local links.  I played around in the plug-in code for a while but finally decided that since I didn’t have that many images, it would be faster to manually copy the images from the file locations that Drupal was using into the WordPress media library and then go through the posts/pages and update the images.

With WordPress’s drag and drop interface to the media library, getting the images into WordPress went very fast.  Going through all of the pages/posts took some time, but was really not that big of a deal.  It gave me the opportunity to also review all of the content that was migrated and make any minor adjustments that I wanted.

So with the tool and then updating images the whole process took less than 4 hours.