-- taken from -- http://vrypan.net/log/archives/2005/03/10/migrating-from-drupal-to-wordpress/ -- and then improved :-) -- these lines will result in the deletion of all existing posts, comments -- and categories. Comments these out using '--' or /* ... */ if you don't -- want that to happen DELETE FROM wp_categories ; DELETE FROM wp_posts ; DELETE FROM wp_post2cat ; DELETE FROM wp_comments ; /* -- does not work (think it is to do with password issues) -- also causes problems with auto-increment delete from wp_users; INSERT INTO wp_users (ID, user_login, user_pass, user_nickname, user_email, user_registered) SELECT uid, name, pass, name, mail, FROM_UNIXTIME(timestamp) FROM users; */ INSERT into wp_categories( cat_ID,cat_name, category_nicename, category_description, category_parent ) SELECT term_data.tid, name, name, description, parent FROM term_data, term_hierarchy WHERE term_data.tid=term_hierarchy.tid; INSERT INTO wp_posts( ID, post_author, post_date, post_content, post_title, post_excerpt, post_name, post_modified ) SELECT a.nid, 1, FROM_UNIXTIME(a.created), b.body, a.title, b.teaser, concat('OLD',a.nid), FROM_UNIXTIME(a.changed) FROM node as a, node_revisions as b WHERE a.nid = b.nid AND (a.type='blog' OR a.type='page' OR a.type='story' OR a.type='forum'); INSERT INTO wp_post2cat (post_id,category_id) SELECT nid,tid FROM term_node ; INSERT INTO wp_comments ( comment_post_ID, comment_date, comment_content, comment_parent ) SELECT nid, FROM_UNIXTIME(timestamp), concat(subject,' ', comment), thread FROM comments ; DROP TABLE term_data; DROP TABLE term_hierarchy; DROP TABLE node; DROP TABLE term_node; DROP TABLE comments; DROP TABLE users;