<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Migrate/Convert/Import Drupal 5.x to WordPress 2.7</title>
	<atom:link href="http://www.mikesmullin.com/development/migrate-convert-import-drupal-5-to-wordpress-27/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikesmullin.com/development/migrate-convert-import-drupal-5-to-wordpress-27/</link>
	<description>Personal Blog</description>
	<lastBuildDate>Wed, 10 Mar 2010 02:52:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Revamping my website &#124; Shufei Lei</title>
		<link>http://www.mikesmullin.com/development/migrate-convert-import-drupal-5-to-wordpress-27/comment-page-1/#comment-33495</link>
		<dc:creator>Revamping my website &#124; Shufei Lei</dc:creator>
		<pubDate>Tue, 23 Feb 2010 19:54:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikesmullin.com/?p=58#comment-33495</guid>
		<description>[...] a couple of months, I finally migrated my website from Drupal to Wordpress, with the help of the migration SQL code from Mike Smullin. Though I loved Drupal and spent a significant amount of time and effort in building out my site, I [...]</description>
		<content:encoded><![CDATA[<p>[...] a couple of months, I finally migrated my website from Drupal to Wordpress, with the help of the migration <acronym title="Structured Query Language">SQL</acronym> code from Mike Smullin. Though I loved Drupal and spent a significant amount of time and effort in building out my site, I [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sangprabo</title>
		<link>http://www.mikesmullin.com/development/migrate-convert-import-drupal-5-to-wordpress-27/comment-page-1/#comment-32169</link>
		<dc:creator>sangprabo</dc:creator>
		<pubDate>Fri, 22 Jan 2010 14:07:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikesmullin.com/?p=58#comment-32169</guid>
		<description>Hi, thanks for such a great post. It really helps me. There is one thing I don&#039;t understand:
When we import drupal.comments into wordpress.wp_comments, approved comments become hidden/pending and vice versa. I think it&#039;s because status field list in Drupal is set to 0 when comment is approved, but Wordpress&#039;s comment_approved is set to 1 when comment is approved.

This sql command works for me
UPDATE wordpress.wp_comments set comment_approved = (comment_approved + 1) % 2;

Feel free to edit it as you wish. Ah, I&#039;m using Drupal 5.7 and Wordpress 2.8.6 by the way. Thanks again!</description>
		<content:encoded><![CDATA[<p>Hi, thanks for such a great post. It really helps me. There is one thing I don&#8217;t understand:<br />
When we import drupal.comments into wordpress.wp_comments, approved comments become hidden/pending and vice versa. I think it&#8217;s because status field list in Drupal is set to 0 when comment is approved, but Wordpress&#8217;s comment_approved is set to 1 when comment is approved.</p>
<p>This sql command works for me<br />
UPDATE wordpress.wp_comments set comment_approved = (comment_approved + 1) % 2;</p>
<p>Feel free to edit it as you wish. Ah, I&#8217;m using Drupal 5.7 and Wordpress 2.8.6 by the way. Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alicia</title>
		<link>http://www.mikesmullin.com/development/migrate-convert-import-drupal-5-to-wordpress-27/comment-page-1/#comment-31634</link>
		<dc:creator>Alicia</dc:creator>
		<pubDate>Fri, 08 Jan 2010 15:41:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikesmullin.com/?p=58#comment-31634</guid>
		<description>Thanks for sharing this, it worked great for me!</description>
		<content:encoded><![CDATA[<p>Thanks for sharing this, it worked great for me!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fade</title>
		<link>http://www.mikesmullin.com/development/migrate-convert-import-drupal-5-to-wordpress-27/comment-page-1/#comment-27140</link>
		<dc:creator>fade</dc:creator>
		<pubDate>Sun, 06 Sep 2009 23:32:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikesmullin.com/?p=58#comment-27140</guid>
		<description>In case category didn&#039;t appear, use this in your wordpress database:

update wp_term_relationships,wp_term_taxonomy set wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id where wp_term_relationships.term_taxonomy_id=wp_term_taxonomy.term_id;</description>
		<content:encoded><![CDATA[<p>In case category didn&#8217;t appear, use this in your wordpress database:</p>
<p>update wp_term_relationships,wp_term_taxonomy set wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id where wp_term_relationships.term_taxonomy_id=wp_term_taxonomy.term_id;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nils Schulte am Hülse</title>
		<link>http://www.mikesmullin.com/development/migrate-convert-import-drupal-5-to-wordpress-27/comment-page-1/#comment-25427</link>
		<dc:creator>Nils Schulte am Hülse</dc:creator>
		<pubDate>Mon, 29 Jun 2009 07:22:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikesmullin.com/?p=58#comment-25427</guid>
		<description>&lt;strong&gt;Migration zur&#252;ck zu WP: Drupal in WordPress importieren...&lt;/strong&gt;

Vor ca. 1,5 Jahren habe ich mich entschieden mit meinem privaten Blog den Wechsel von WordPress auf Drupal zu wagen. Dabei habe ich wertvolle Erfahrungen gesammelt - aber nun m&#246;chte ich die bestehenden Inhalte in diesen WordPress MU Blog importier...</description>
		<content:encoded><![CDATA[<p><strong>Migration zur&#252;ck zu WP: Drupal in WordPress importieren&#8230;</strong></p>
<p>Vor ca. 1,5 Jahren habe ich mich entschieden mit meinem privaten Blog den Wechsel von WordPress auf Drupal zu wagen. Dabei habe ich wertvolle Erfahrungen gesammelt &#8211; aber nun m&#246;chte ich die bestehenden Inhalte in diesen WordPress MU Blog importier&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vinnie</title>
		<link>http://www.mikesmullin.com/development/migrate-convert-import-drupal-5-to-wordpress-27/comment-page-1/#comment-24543</link>
		<dc:creator>Vinnie</dc:creator>
		<pubDate>Mon, 01 Jun 2009 08:13:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikesmullin.com/?p=58#comment-24543</guid>
		<description>this was a huge help, and better then the other posts i&#039;ve come across (for instance, they didn&#039;t get the comment counts working correctly).

thank you.</description>
		<content:encoded><![CDATA[<p>this was a huge help, and better then the other posts i&#8217;ve come across (for instance, they didn&#8217;t get the comment counts working correctly).</p>
<p>thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allen</title>
		<link>http://www.mikesmullin.com/development/migrate-convert-import-drupal-5-to-wordpress-27/comment-page-1/#comment-21186</link>
		<dc:creator>Allen</dc:creator>
		<pubDate>Fri, 10 Apr 2009 22:04:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikesmullin.com/?p=58#comment-21186</guid>
		<description>Thanks for updating/creating this script - for me it&#039;s nearly perfect - two issues:

1. the insert for the posts does not work - says duplicate id error - only way to get it to work was to change insert into to replace into

2. the categories dont line up with the posts - is this because of the replace above?</description>
		<content:encoded><![CDATA[<p>Thanks for updating/creating this script &#8211; for me it&#8217;s nearly perfect &#8211; two issues:</p>
<p>1. the insert for the posts does not work &#8211; says duplicate id error &#8211; only way to get it to work was to change insert into to replace into</p>
<p>2. the categories dont line up with the posts &#8211; is this because of the replace above?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kin</title>
		<link>http://www.mikesmullin.com/development/migrate-convert-import-drupal-5-to-wordpress-27/comment-page-1/#comment-20726</link>
		<dc:creator>Kin</dc:creator>
		<pubDate>Tue, 07 Apr 2009 12:13:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikesmullin.com/?p=58#comment-20726</guid>
		<description>Thanks very much. I was importing from drupal 6 to wordpress 2.7 and I had to make some minor changes, for example, in drupal posts are saved as stories rather than posts. this meant the weren&#039;t showing up. I just added this little find and replace to the end:

UPDATE wp_posts SET post_type = REPLACE(post_type,&#039;story&#039;,&#039;post&#039;);

I also had to make some changes to the comments import as it was throwing up some &#039;database not selected errors&#039;:

# update comments count on wp_posts table
UPDATE wordpress.wp_posts SET `comment_count` = (SELECT COUNT(`comment_post_id`) FROM wordpress.wp_comments WHERE `wp_posts`.`id` = `wp_comments`.`comment_post_id`);

Thanks again for the script, this was just what the doctor ordered :)</description>
		<content:encoded><![CDATA[<p>Thanks very much. I was importing from drupal 6 to wordpress 2.7 and I had to make some minor changes, for example, in drupal posts are saved as stories rather than posts. this meant the weren&#8217;t showing up. I just added this little find and replace to the end:</p>
<p>UPDATE wp_posts SET post_type = REPLACE(post_type,&#8217;story&#8217;,'post&#8217;);</p>
<p>I also had to make some changes to the comments import as it was throwing up some &#8216;database not selected errors&#8217;:</p>
<p># update comments count on wp_posts table<br />
UPDATE wordpress.wp_posts SET `comment_count` = (SELECT COUNT(`comment_post_id`) FROM wordpress.wp_comments WHERE `wp_posts`.`id` = `wp_comments`.`comment_post_id`);</p>
<p>Thanks again for the script, this was just what the doctor ordered <img src='http://www.mikesmullin.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Honal</title>
		<link>http://www.mikesmullin.com/development/migrate-convert-import-drupal-5-to-wordpress-27/comment-page-1/#comment-17826</link>
		<dc:creator>Honal</dc:creator>
		<pubDate>Tue, 24 Mar 2009 06:35:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikesmullin.com/?p=58#comment-17826</guid>
		<description>You might want to change the query to include blogs too to

INSERT INTO startupmedia_wp.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) = &#039;/&#039;, SUBSTR(a.dst, 12), a.dst) `post_name`,
 FROM_UNIXTIME(n.changed) `post_modified`,
 n.type `post_type`,
 IF(n.status = 1, &#039;publish&#039;, &#039;private&#039;) `post_status`
FROM startupmedia_drupal.node n
INNER JOIN startupmedia_drupal.node_revisions r
 USING(vid)
LEFT OUTER JOIN startupmedia_drupal.url_alias a
 ON a.src = CONCAT(&#039;node/&#039;, n.nid)
WHERE n.type IN (&#039;post&#039;, &#039;page&#039;,&#039;blog&#039;);

and then add

update startupmedia_wp.wp_posts set post_type= &#039;post&#039; where post_type =&#039;blog&#039;


this will make sure that the blogs are also copied</description>
		<content:encoded><![CDATA[<p>You might want to change the query to include blogs too to</p>
<p>INSERT INTO startupmedia_wp.wp_posts (id, post_date, post_content, post_title, post_excerpt, post_name, post_modified, post_type, `post_status`)<br />
SELECT DISTINCT<br />
 n.nid `id`,<br />
 FROM_UNIXTIME(n.created) `post_date`,<br />
 r.body `post_content`,<br />
 n.title `post_title`,<br />
 r.teaser `post_excerpt`,<br />
 IF(SUBSTR(a.dst, 11, 1) = &#8216;/&#8217;, SUBSTR(a.dst, 12), a.dst) `post_name`,<br />
 FROM_UNIXTIME(n.changed) `post_modified`,<br />
 n.type `post_type`,<br />
 IF(n.status = 1, &#8216;publish&#8217;, &#8216;private&#8217;) `post_status`<br />
FROM startupmedia_drupal.node n<br />
INNER JOIN startupmedia_drupal.node_revisions r<br />
 USING(vid)<br />
LEFT OUTER JOIN startupmedia_drupal.url_alias a<br />
 ON a.src = CONCAT(&#8216;node/&#8217;, n.nid)<br />
WHERE n.type IN (&#8216;post&#8217;, &#8216;page&#8217;,'blog&#8217;);</p>
<p>and then add</p>
<p>update startupmedia_wp.wp_posts set post_type= &#8216;post&#8217; where post_type =&#8217;blog&#8217;</p>
<p>this will make sure that the blogs are also copied</p>
]]></content:encoded>
	</item>
</channel>
</rss>
