geek stories and photography misadventures
Change of Hearts – Transfer Serendipity to Wordpress
Yes, it was a hard decision. But its for the best.
Bye serendipity… Hello Wordpress!
Lot of issues for the change, but it just actually because of the limited plugins/widgets serendipity was offering.
Anyway good thing i found this blog to export my blog entries from serendipity to wordpress
First the idea.
1.WordPress (wp) do not have a Serendipity (s9y) import. It does have a RSS2.0 import
2.Serendipity has an full RSS feed export
So it looks like it is a simple export RSS in s9y and import RSS in wp. If only thing is so easy.
The problems:
1.Although s9y says “Export full RSS feed”, it actually export the first part of a 2 parts post.
2.s9y encode html tags < as & lt; and > as & gt;
wp however expect them to be un-encode and enclosed with CDATA[' ']
3.Time out well importing too big a rss file.
The solution:
1.Fix the full export
In the file rss.php (in the root folder), find this line serendipity_printEntries_rss($entries, $version, $comments, $metadata['fullFeed'], $metadata['showMail']);before the line add$metadata['fullFeed'] = true;Go into Serendipity admin and click on Export entries.
Save the xml file
2.Fix the encoding
Open the xml file in a text editor (Try NotePad2)
Do a search and replace
& lt; with < & gt; with >
3.Fix the time out
At the top of wp-admin/admin.php
add set_time_limit(0);
| Print article | This entry was posted by Joel on March 31, 2009 at 7:14 am, and is filed under Technology rocks!. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |