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 http://nullpointer.debashish.com. 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.

Debashish Chakrabarty

Debashish Chakrabarty, a Software Consultant based at Pune, has been on the Internet since the “geocities” days but opened his Blogger account in October 2002. Apart from this blog he also maintains a Hindi blog NuktaChini.

You may also like...

13 Responses

  1. Hardik says:

    Yes, I noticed the same and I have also modified at my blog!

    Thanks.

  2. debashish says:

    Thanks Haredik for pointing the wrong timestamp on comments. Infact this is a bug in Squible, it displays the “Post Timestamp” with the comments as well. I changed the theme’s comments.php and it works fine now.

  3. Hardik says:

    Yes, after installing UTW, it is working fine…

    Thank you…

    One more thing, I noticed that dates at your site are not proper… It shows Tuesday, April 4th, 2006 for today’s post!

  4. debashish says:

    Hardik I think your problem is that you don’t have UTW (Ultimate Tag Warrior) plugin on your WP install. UTW gives you the option to treat Categories as Tags ahd handles it on its own.

  5. Hardik says:

    Hi,

    This is a useful information. I am also trying to move my jroller weblog to wordpress. Also, I am impressed by this theme. In this theme, I am getting errors like:

    Tags
    Fatal error: Call to undefined function: show_tags() in …/html/blog/wp-content/themes/squible/single.php on line 153

    I think my current wordpress supports “Categories” while this theme requires “Tag” system. So, how can I migrate from categories to tag?

    Thanks.

  6. justin says:

    Please ignore my last comment. Your macro works just fine in roller 1.2. Not sure what I was doing wrong initally, but after creating a new template it worked fine.

  7. justin says:

    Thanks for great information on importing into WordPress from Roller. Unfortunately for me I am using Roller 1.2, which looks to not have a few of the functions that you show using in your macro. If anyone has a Roller 1.2 script that works please let me know. Thanks again for the article and pointing me in the right direction.

  8. Amit Gupta says:

    Congrats!! Good choice of the theme!! 🙂

  9. Jitu says:

    Debu Da,
    Mabrooq! (Congratulations in Arabic) on migration of Null Pointer to new location. Please contribute in WordPress Wiki regarding Migration Process or inform Support forum in WordPress.org. Looking forward to more technical posts at Null Pointer.

    Debashish Replied:Shukran! The link to the post on Migrating Blog from Roller to WordPress has already been added to their Wiki.

  1. April 12, 2006

    […] whew. After a headstand, I have finally managed to migrate all blog posts from my old blog on hosted rollerweblogger to wordpress. Debashish’s tutorial really helped. It was just great. But one thing I had to do in addition was to perform a global disablement of my Read More Summary plugin on roller to completely migrate all posts over. Anyway the tedious task is done. I hope to successfully maintain and continue posting on this blog from here on forward. […]

  2. October 21, 2006

    […] A little googling for migrate roller weblogger to wordpress led me to this article: Migrating a Roller blog to WordPress. The author’s custom template works for generic RSS. While WordPress can use this format, I had better success using the WordPress eXtended RSS (WXR) format. […]

  3. January 23, 2007

    […] I have just imported the posts within minutes from my old blog (http://www.jroller.com/page/ldewavrin) following these recommandations […]

  4. April 5, 2007

    […] were spot on. 2. Get Jroller to generate full RSS 2.0 feed with comments The instructions came from Null Pointer, but I made a minor change to add the IP tag in comment section with following line: […]