How To Convert Drupal To WordPress

Heads up, folks! This guide’s gonna help ya flip yer Drupal to WordPress. We’re talkin’ the latest versions as of Jan 1, 2015, got it?

flip drupal to wordpressAfter trollin’ the net for some DIY guides, comin’ up short with parts MIA, no clear-as-day explanations, and generally feelin’ let down, I figured I’d give it a shot myself. As a dev, challenges are my jam, I love puttin’ the pieces together. Found some decent guides, sure, but once I sorted out my own Drupal to WordPress switch, knew I had to spill the beans in the easiest way I could.

Hold up, though – this tutorial ain’t gonna hold your hand on how to flip your stat counters, get your Disqus comments to match up (if you’re using Disqus over your CMS’s built-in comments), or specific modules storing info in the database. You gotta figure out a tailor-made plan for that yourself.

Some bumps I hit on the road were questions from other devs about converting tables and users. Tons of questions about the user flip from Drupal to WordPress. This issue got the cold shoulder in some guides. Some scripts were a no-show or didn’t include info on flipping users.

Also, had trouble getting categories and tags to translate to the right taxonomy during my switch. They mostly ended up dumped into the tags. The fix? Make sure these taxonomies are correctly tagged in the original Drupal install. Tags ain’t hierarchical and Categories are.

Another hitch was hitting duplicate errors when feeding the SQL through the conversion process. The fix? Check the last table that was flipped and only flip from after that table. It was a pain, especially since I was flipping 17k posts and over 2.5k users. What a way to learn how to flip Drupal to WordPress, eh?

This post is gonna walk ya through how to flip Drupal to WordPress, mostly core stuff like the database (like posts, post meta, taxonomies, post types, users, and comments), and a bit about switching the theme.

Flip Drupal To WordPress: The Database

  1. Grab the Drupal SQL file from the old host.
  2. Set up a brand new WordPress site. Gotta clear the tables with the TRUNCATE command by diving into your database’s SQL queries tab in phpmyadmin. Here’s the magic words:

TRUNCATE TABLE wordpress.wp_comments; TRUNCATE TABLE wordpress.wp_links; TRUNCATE TABLE wordpress.wp_postmeta; TRUNCATE TABLE wordpress.wp_posts; TRUNCATE TABLE wordpress.wp_term_relationships; TRUNCATE TABLE wordpress.wp_term_taxonomy; TRUNCATE TABLE wordpress.wp_terms; Remember, replace ‘wordpress’ before the period with your database table name before running the query. If you’re running the query straight from the WordPress database, ditch ‘wordpress’ and the period in the code when you run the script.

  1. If you’ve got multiple users to flip, you’ll need this code.

DELETE FROM wordpress.wp_users WHERE ID > 1; DELETE FROM wordpress.wp_usermeta WHERE user_id > 1; Again, replace ‘wordpress’ before the period with your database table name before you run the query.

  1. This query’ll flip over tags:


  1. This flips over posts.


  1. If you wanna lump post types together in WordPress, you’d use this code:

(UPDATE code)

  1. This code defines the post/tag relationship


  1. This one’s for comments:


  1. If you’re keeping your Drupal images and files where they are, do nothin’. But, if you’re moving your files to

  1. wp_term_taxonomy
    : Here you’ll need to define whether each term is a category, a tag, or a link.
  2. wp_term_relationships: This will relate posts to terms and term_taxonomy.INSERT INTO wp_term_relationships(object_id, term_taxonomy_id, term_order) SELECT nid, tid, 0 FROM drupal.term_node

Once you’ve run all these SQL queries, you should have your Drupal content in your WordPress database.

Remember: It’s important to modify the SQL queries to match your database names, table prefixes, and any specifics related to your own sites.

  1. Reconfigure your WordPress Permalinks: Now, you’ll need to ensure your new WordPress site’s URL structure matches that of your old Drupal site to maintain SEO and not break any links. You can set this in WordPress under Settings > Permalinks.

Note: This is a simplistic overview of the Drupal to WordPress migration process and may not cover all details or problems you may encounter. Always back up your site’s data before attempting a migration and consider getting professional help if the process seems beyond your technical expertise.