{"id":82,"date":"2006-02-02T22:01:00","date_gmt":"2006-02-02T22:01:00","guid":{"rendered":"http:\/\/blog.trungson.com\/?p=82"},"modified":"2006-02-02T22:01:00","modified_gmt":"2006-02-02T22:01:00","slug":"blog-conversion-plog-to-wordpress","status":"publish","type":"post","link":"http:\/\/blog.trungson.com\/?p=82","title":{"rendered":"Blog Conversion &#8211; pLog to WordPress"},"content":{"rendered":"<p>To convert database from pLog to WordPress, you basically need to run 2 SQL queries, assuming you have them on the same server.<\/p>\n<p><textarea name=\"code\" class=\"sql\"><br \/>\n# Posts<br \/>\nINSERT INTO db_wordpress.wp_posts<br \/>\n (<br \/>\n ID,<br \/>\n post_author,<br \/>\n post_date,post_date_gmt,<br \/>\n post_content,post_title,<br \/>\n post_modified,post_modified_gmt<br \/>\n )<br \/>\nSELECT<br \/>\n a.id,<br \/>\n 1,<br \/>\n FROM_UNIXTIME(UNIX_TIMESTAMP(a.date)),<br \/>\n FROM_UNIXTIME(UNIX_TIMESTAMP(a.date)+5*3600),<br \/>\n p.text,p.topic,<br \/>\n FROM_UNIXTIME(UNIX_TIMESTAMP(a.date)),<br \/>\n FROM_UNIXTIME(UNIX_TIMESTAMP(a.date)+5*3600)<br \/>\n FROM db_plog.plog_articles_text p,db_plog.plog_articles a<br \/>\n WHERE a.id=p.article_id<\/p>\n<p># Post-Categories Relationship<br \/>\nINSERT INTO db_wordpress.wp_post2cat (post_id,category_id)<br \/>\n SELECT r.article_id,r.category_id FROM db_plog.plog_article_categories_link r<br \/>\n<\/textarea><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To convert database from pLog to WordPress, you basically need to run 2 SQL queries, assuming you have them on the same server. # Posts INSERT INTO db_wordpress.wp_posts ( ID, post_author, post_date,post_date_gmt, post_content,post_title, post_modified,post_modified_gmt ) SELECT a.id, 1, FROM_UNIXTIME(UNIX_TIMESTAMP(a.date)), FROM_UNIXTIME(UNIX_TIMESTAMP(a.date)+5*3600), p.text,p.topic, FROM_UNIXTIME(UNIX_TIMESTAMP(a.date)), FROM_UNIXTIME(UNIX_TIMESTAMP(a.date)+5*3600) FROM db_plog.plog_articles_text p,db_plog.plog_articles a WHERE a.id=p.article_id # Post-Categories Relationship INSERT INTO db_wordpress.wp_post2cat [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts\/82"}],"collection":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=82"}],"version-history":[{"count":0,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts\/82\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=82"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=82"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}