How I moved a blog from Serendipity to WordPress

I had a blog using the S9Y framework aka Serendipity but obviously since WordPress is THE blogging framework around I had to move to it.

Unfortunately S9Y is not one of the supported import modes of WordPress. Fortunately, a quick Google search pointed me to the following page, which gives one ! You just need to drop the file in the wp-admin/import directory of your wordpress installation, and use the standard import mechanism.

After that, I ran into the following error beause of my hosting provider (free.fr) : “failed to delete and flush buffer. No buffer to delete or flush”. After lots of goggle search which led nowhere since this is a classic PHP error happening on lots of blogs, I decided to tackle the problem myself. After some good old “echo debugging”, I found out, that the problem was the following line of the serendipity.php file :

$cats = $this->get_s9y_cat_assoc($ret_id);

I commented it out and replaced it by :

$cats = array();

Now, you might say “cool, but this has to have some side effects!”. And you’re right. Apparently with the posts category, but since there was none on the imported blogs… Who cares 😉

Don’t hesitate to post, if you know a better solution !

6 thoughts on “How I moved a blog from Serendipity to WordPress”

  1. A friend told me I stilla had a problem with the accents … I think I now have solved the problem adding the following line :$s9ydb->query(‘SET CHARACTER SET latin1;’);I guess you should put it right before the get_results calls, and I’m not sure if it should be a one time thing or if it should be done before any query.The reason behind that is encoding : Serendipity is in latin1 and PHP in UTF8 by default, thus messing up accents !

  2. A friend told me I stilla had a problem with the accents … I think I now have solved the problem adding the following line :$s9ydb->query(‘SET CHARACTER SET latin1;’);I guess you should put it right before the get_results calls, and I’m not sure if it should be a one time thing or if it should be done before any query.The reason behind that is encoding : Serendipity is in latin1 and PHP in UTF8 by default, thus messing up accents !

  3. WIth that many explanation onto why … It’s hard to get a discussion rolling !!! Could you give a little more insight on why you may think so ?
    Thanks !

  4. WIth that many explanation onto why … It’s hard to get a discussion rolling !!! Could you give a little more insight on why you may think so ?
    Thanks !

Leave a Reply