很久沒有blog, 今日中秋節補假進行一次”搬家” 其實都不是搬家, 只係將幾年前blogspot 的entry import 到 wordpress, 再將LifeType 既entry?SQL copy 到?wordpress 雖然呢個default template 有點簡單 (都唔只有點…), 過幾日有時間再搵d template Reference: 從 Blogger 轉移到 WordPress 的技巧 http://www.vixual.net/blog/archives/242 到 WordPress 的 [後台管理] -> [管理] -> [匯入] -> [部落客]。 終於把lifetype 轉成 WordPress http://blog.mypage.idv.tw/?p=36 透過sql語法將 資料 新增到 WordPress 資料庫中
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# comment INSERT INTO wp_comments (comment_ID, comment_post_ID, comment_content, comment_date, comment_date_gmt, comment_author_email, comment_author_url, comment_author, comment_author_IP) SELECT XXX+id, YYY+article_id, normalized_text, DATE, DATE + INTERVAL - 16 HOUR, user_email, user_url, user_name, client_ip FROM plog_articles_comments # post INTO wp_posts (ID, post_author, post_date, post_date_gmt, post_modified, post_modified_gmt, comment_count) SELECT YYY+id, 2, DATE, DATE + INTERVAL - 16 HOUR, DATE, DATE + INTERVAL - 16 HOUR, num_comments FROM plog_articles UPDATE wp_posts, plog_articles_text SET wp_posts.post_title = plog_articles_text.topic WHERE wp_posts.ID = plog_articles_text.id + YYY UPDATE wp_posts, plog_articles_text SET wp_posts.post_content = plog_articles_text.TEXT WHERE wp_posts.ID = plog_articles_text.id + YYY # fill out guid UPDATE wp_posts SET wp_posts.guid = CONCAT("<a href="http://www.YourDomain.com/blog/archives/" data-mce-href="http://www.YourDomain.com/blog/archives/">http://www.YourDomain.com/blog/archives/</a>", wp_posts.ID) WHERE wp_posts.guid = "" # clean out [@more@] update wp_posts set post_content=replace(post_content,'[@more@]',""); |