Exporting Drupal Pages/Posts to WordPress
I’ve decided to consolidate some of my web presence. My car’s website will be merged into this one. Going from WordPress to Drupal is easy, but the other way is not. I found a couple links for SQL scripts to import lots of posts automatically, but these were and are easily outdated by Drupal and to a lesser extent WordPress.
It was easier just to create my own SQL JOIN statement and export the resulting list. Since I have so few posts (images are hosted elsewhere), it won’t be difficult to import each of them manually. With a little more SQL work, you could import the resulting list into WordPress.
At the time of writing, my WordPress is version 3.8, and Drupal is a bit older at version 7.14. Below is the SQL I used to gather complete posts from Drupal:
SELECT nid, type, created, title, body_value<br /> FROM field_data_body<br /> INNER JOIN node ON field_data_body.entity_id = node.nid<br />
And that’s all I needed.