I’m a WordPress Bhoy boy looking for a WordPress girl 🙂 yes for last 2 days I’m using WordPress… Not it is not a fools day prank… You can check this blog is on WordPress… I’ve been using Drupal CMS for my blog for last 4 years and I’ve great love for Drupal… There were lot criticism and cry from Drupal world… Even I got a shout from a buddy in twitter…
tronathan@anandnataraj Why on earth would you go from drupal TO wordpress? please enlighten me…
2.) Make sure both wordpress and drupal tables are in same database…
Please use below SQL queries to export the posts and comments from drupal to wordpress 2.7.1. I used phpmyadmin to write queries
This sql will export all posts from drupal to wordpress 2.7.1
# Use the Drupal database
use db261070012;
# Remove all current posts from WordPress
TRUNCATE TABLE wp_posts;
# Insert posts from Drupal into WordPress
INSERT INTO wp_posts (id, post_date, post_content, post_title, post_excerpt, post_name, post_modified, post_type, `post_status`)
SELECT DISTINCT
n.nid `id`,
FROM_UNIXTIME(n.created) `post_date`,
r.body `post_content`,
n.title `post_title`,
r.teaser `post_excerpt`,
IF(SUBSTR(a.dst, 11, 1) = ‘/’, SUBSTR(a.dst, 12), a.dst) `post_name`,
FROM_UNIXTIME(n.changed) `post_modified`,
‘post’ `post_type`,
IF(n.status = 1, ‘publish’, ‘private’) `post_status`
FROM cms_node n
INNER JOIN cms_node_revisions r
USING(vid)
LEFT OUTER JOIN cms_url_alias a
ON a.src = CONCAT(‘node/’, n.nid)
;
This sql will export all comments from drupal to wordpress 2.7.1
TRUNCATE TABLE wp_comments;INSERT INTO wp_comments (comment_post_ID, comment_date, comment_date_gmt, comment_content, comment_parent, comment_author, comment_author_email, comment_author_url, comment_author_ip, comment_approved)SELECTnid,FROM_UNIXTIME(timestamp),FROM_UNIXTIME(timestamp),comment,0,name,IF(mail=”, CONCAT(REPLACE(LOWER(name),’ ‘, ”), ‘@’, hostname, ‘.localhost’), mail),homepage,hostname,1FROM cms_comments;
This sql will update the number of counts in wordpress posts table
# update comments count on wp_posts tableUPDATE wp_posts SET comment_count = (SELECT COUNT(comment_post_id) FROM wp_comments WHERE wp_posts.id = wp_comments.comment_post_id);
5.) Finally pointed my site’s destination from /anandnataraj (location where drupal files reside) to /anandnataraj/blog (wordpress files)…
6.) Changed rewritebase in /anandnataraj/blog/.htaccess from “/blog” to “/”…
Changed the site URL and blog URL in wp_options table to http://www.anandnataraj.com
hey.. good to see you shifting to WP 🙂 btw where did you get the mug printed??
hey thank you dude… infact you are instrumental for this change :)… got those mugs printed in forum mall, bangalore…