WordPress Comments Restored

May 20th, 2009

I took a few minutes this morning to put a script together that would convert the comments from the old blog into the new WordPress format – another time-saving excercise that allowed me to convert 300+ comments in a few minutes.

The only hurdle I had with this was that the rowId for posts in the old table doesn’t marry up to the new one, so the process had to go something like this:

  1. Get the entry lookup for a comment.
  2. Find the titles of that entry from the old posts table.
  3. Look for that title in the new posts table.
  4. Grab the rowId from step 3.
  5. Save the comment with the new lookup.

So!  Comments are restored and visitors can continue their ranting and raving (especially on this post!), only with extra Spam protection for me, which is nice.

Edit:
Two posts in two days!  We’re on a roll!