Migrating a Roller blog to WordPress

Ok I admit that I never made a formal announcement about it, but this blog has now moved to its new home at If you are reading this, you are at the right URL.

This blog used to be happily hosted at the excellent free service provided by the JRoller people. Roller is one of the advanced blogwares around, written using Java and I enjoyed using it throughout. If I could afford Java hosting, I would have probably gone for JRoller again. However, with PHP there is hardly any competition for WordPress. So dear readers, here is Null Pointer on WordPress, running on the pretty Squible theme.

Now to the crux of this post. How did I manage migrating all the Posts and comments from JRoller to WordPress?

It was not simple really; because JRoller does not provide any mechanism to backup blog posts, leave alone the comments. Therefore, I asked the Roller people and Dave Johnson was kind enough to come to my rescue. He gave the plausible suggestion of creating a custom RSS Feed. The basic modus operandi is:

  • create a new template in your blog
  • within the template use the $pageModel object to fetch all entries of your blog
  • iterate through those entries to output your blog in RSS or Atom format
  • create your own name-spaced XML element to represent comments within each item
  • write a simple program that parses that and uses MetaWeblog API to post to your new blog

Now the last step is not that intricate because, guess what, WordPress 2.0 does provide the facility to import a blog from a RSS feed. Yet the ordeal would be far from over, because while WordPress can import posts from your feed it cannot import the post comments. Nothing against WordPress, the RSS 2.0 specification does allow a comments sub element but that can only be a link to the actual comments page. So basically we need to defy them all, add the comments inline in our custom RSS Feed and then modify the wordpress RSS Import Utility to decipher and import the comments as well.

When you are ready with your JRoller blog feed, just backup the existing RSS Importer file (wp-admin/import/rss.php) and place the modified importer PHP there. Rest is easy, only remember to break up your RSS file into smaller chunks if you have a really large blog, the importer has the tendency to timeout often.

WP RSS Importer

  • Click here to view the Roller template to create your custom RSS2.0 Feed that includes comments as well.
  • Click here to view the modified WordPress RSS Importer.

I hope this post helped you, do leave your comments here.

Disclaimer: The information provided on this page comes without any warranty whatsoever. Use it at your own risk.


Blogger block

Charu refers to an article on how to deal with the blogger burnout, a term I came to terms with when Jivha quit blogging. For me it has been more the case of Blogger block rather than burnout. I have never been a zealous blogger anyway but few months back I at least would right twice/thrice a week, it is still twice or thrice but the weeks have turned into months. A blog-friend, who just would not have Null Pointer on his blogroll ;), tauntingly observed recently, “I like your blog but it would be better if you at least have one post a week instead of one a month”. Some write to me inquiring if I have quit blogging, and while I am reading all those blogs regularly, I am often ashamed to find a referrer log entry from a reader who visited my blog expecting some new post but (perhaps) went away perturbed. I worry if s/he would ever come back again.

A thing that prevents me from blogging regularly is absence of net connectivity at home. Then the recent happenings at the personal front are to be blamed too. Blogging at work is definitely awkward, your colleagues keep staring at your monitor and are not content to ask “Yeh kya hai?”; preparing a post especially in Hindi (and I am very poor at punching Hindi on Takhti) seems more heinous than looking a porno pop-up that shockingly appeared from an innocent looking site. During the day I must have been thinking at least a dozen times to blog about this and blog about that, but I am too lazy to jot it down immediately. Then it slips from your mind and poof, the slate is clean again. Now, I never have been in the habit of posting a link with a short comment, an advice given in the article that I just can’t follow, most of my posts are lengthy, some are notoriously so.

So I don’t think I (and the readers) have much choice really except that I don’t care a damn about those staring eyeballs and don’t feel ashamed in jotting a short link post instead of waiting to post longer ones and then not posting at all.