Skip to content

Instantly share code, notes, and snippets.

@erraggy
Created May 26, 2011 07:31
Show Gist options
  • Select an option

  • Save erraggy/992718 to your computer and use it in GitHub Desktop.

Select an option

Save erraggy/992718 to your computer and use it in GitHub Desktop.
Custome query to insert the data I exported from CommunityServer into WordPress
INSERT INTO wp_xxxxx_posts
(post_author,
post_date,
post_date_gmt,
post_content,
post_title,
post_status,
post_name,
post_modified,
post_modified_gmt,
guid)
SELECT 2 AS post_author,
cs_posts.PostDate AS post_date,
cs_posts.PostDate AS post_date_gmt,
cs_posts.FormattedBody AS post_content,
cs_posts.Subject AS post_title,
'draft' AS post_status,
cs_posts.slug AS post_name,
cs_posts.PostDate AS post_modified,
cs_posts.PostDate AS post_modified_gmt,
cs_posts.old_url AS guid
FROM cs_posts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment