• 05 Sep 2009 /  Web Design No Comments

    The regulars will know i’ve been waxing lyrical about tweaking my blog theme and moving to WordPress for ages now. Sorry for the wait. My own custom theme is still in development hell and all this humming and hawing means I’ve been neglecting my blogging duties, so I thought I would try out the “Blue Mist” theme by AOE media GmbH and finally start using WordPress for real. I’m finding this theme quite peaceful and serene.

    Moving from Blogger to WordPress could have been smoother. In an older post I mentioned how the importer stalled and I had to put an xml file through WordPress.com to get my posts across. I think things have moved around in this, the latest version of the stand-alone WordPress (2.8.4), since I couldn’t seem to import an xml file from Blogger.

    This time I tried the importer again and found that it imported a frustrating 195 out of 201 posts, and 136 out of 139 comments. Trying various combinations of Blogger > WordPress.com > WordPress.org didn’t prove very successful as different numbers were imported all the time with the above being the closest I could get.

    So, as a last resort I manually created the missing posts which was fine, but how to get the comments? One of the quirks I discovered with importing Blogger posts into WordPress.com was that the comments from the missing posts were all attributed to another, unrelated, post. Unfortunately, importing into my standalone WordPress blog didn’t carry those comments across (I believe because WP hardcodes the number of comments on a post) and checking the xml file exported from WordPress.com confirmed that it did not include the comments.

    I came across this article online about moving comments by either modifying the mysql database or within the WordPress user interface itself. It looked pretty straightforward but I couldn’t work out how to move individual comments rather than all of them at once (I needed to move 3 out of 5 comments from one post to two others).

    Comments, I discovered are detailed in the WordPress xml file (WXR) within <wp:comment></wp:comment> tags so on a whim I tried manually adding the comments to the xml file. I did this by copying and pasting an existing comment entry (tags included) and changing the author, date and date_gmt entries based on their counterparts back in Blogger. I also changed the comment_id using the hyperlink reference as shown on WordPress.com.

    I didn’t really expect it to work – partly because I found that the comment text itself was shortened and I don’t really know anything about xml files. I assumed the full text was encoded somewhere. Clueless, I simply pasted in the whole comment entry between the [CDATA[ ... ]] tags and it actually worked. In some of the cases the formatting was messed up but nothing that couldn’t be fixed from within the WordPress visual editor.

    I would assume posts could be added in a similar way given that they are also shown in the xml, but since I’d already manually created the relevant posts I decided to use a plugin to move the new comments to their related posts. Comment Move by Nathan Rijksen works very simply by adding a comment move text box to the comment edit screen. You can reassign comments to other posts by entering the post ID but helpfully it also sports a drop-down list of all posts so you can choose by title instead. It’s very straightforward and I had the comments rearranged quite easily.

    So after much drama i’ve finally got my blog on WordPress. I think i’ll keep the Blogger one running but redirected for awhile until I iron out the kinks. A few posts need tidying up and I may tweak this theme a little;-)

    Later.

    [ Posted by your humble author Rambo @ 1:07 am ]

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.