Finally, it is all migrated to WordPress

I have finally spent about 3 hours time total to finish migrating my lifetype journal entries to WordPress.

The next phase is the photo album, but that is not priority.

Since online help fails me (broken links and missing scripts), I've done it manually via phpMyAdmin and mysql queries.

Below are my summary:

wordpress            lifetype: plogdb

ID            article_id
post_author        '1'
post_date &
post_date_gmt        plog_articles -> date
post_content        text
post_title        topic
post_status        'publish'
comment_status,
ping_status        'open'
post_name        topic lowercase and hyphenated
post_modified,
post_modified_gmt    plog_articles -> date
post_parent        '0'
menu_order        '0'
post_type        'post'
guid            http://nycphantom.com/journal/?p=ID
comment_count        plog_articles -> num_nonspam_comments

INSERT INTO `wp_posts`

(article_id,post_author,post_content,post_title,post_status,comment_status,ping_status,post_name,

post_parent,menu_order,post_type,guid)
SELECT ID,'1',text,topic,'publish','open','open',LCASE(REPLACE(REPLACE(REPLACE

(topic,'\'',''),'?',''),' ','-')),'0','0','post',CONCAT('http://nycphantom.com/journal/?p=',ID)

FROM `plog_articles_text`

UPDATE plog_articles p, wp_posts pp SET pp.post_date = p.date, pp.post_date_gmt = p.date,

pp.post_modified = p.date, pp.post_modified_gmt = p.date, pp.comment_count =

p.num_nonspam_comments WHERE pp.id = p.ID AND pp.id <= 2567

UPDATE `plog_article_categories_link` SET category_id = 37 WHERE category_id = 1
UPDATE `plog_article_categories_link` SET category_id = 38 WHERE category_id = 2
UPDATE `plog_article_categories_link` SET category_id = 36 WHERE category_id = 3
UPDATE `plog_article_categories_link` SET category_id = 39 WHERE category_id = 4
UPDATE `plog_article_categories_link` SET category_id = 33 WHERE category_id = 5
UPDATE `plog_article_categories_link` SET category_id = 40 WHERE category_id = 6
UPDATE `plog_article_categories_link` SET category_id = 41 WHERE category_id = 7
UPDATE `plog_article_categories_link` SET category_id = 42 WHERE category_id = 8
UPDATE `plog_article_categories_link` SET category_id = 51 WHERE category_id = 9
UPDATE `plog_article_categories_link` SET category_id = 43 WHERE category_id = 10
UPDATE `plog_article_categories_link` SET category_id = 34 WHERE category_id = 11
UPDATE `plog_article_categories_link` SET category_id = 44 WHERE category_id = 12
UPDATE `plog_article_categories_link` SET category_id = 45 WHERE category_id = 13
UPDATE `plog_article_categories_link` SET category_id = 35 WHERE category_id = 14
UPDATE `plog_article_categories_link` SET category_id = 46 WHERE category_id = 15
UPDATE `plog_article_categories_link` SET category_id = 47 WHERE category_id = 16
UPDATE `plog_article_categories_link` SET category_id = 48 WHERE category_id = 17
UPDATE `plog_article_categories_link` SET category_id = 49 WHERE category_id = 18
UPDATE `plog_article_categories_link` SET category_id = 50 WHERE category_id = 19

UPDATE `plog_article_categories_link` SET category_id = category_id - 30

INSERT INTO `wp_term_relationships` (object_id, term_taxonomy_id, term_order) SELECT article_id,

category_id, '0' FROM `plog_article_categories_link`

Emptied all comments in wordpress, since all spam but 1 testing comment.

INSERT INTO `wp_comments` (comment_ID, comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_karma, comment_approved, comment_parent, user_id) SELECT id, article_id, user_name, user_email, user_url, client_ip, date, date, text, '0', '1', '0', '0' FROM `plog_articles_comments`

This entry was posted in Technical. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.