{"id":146,"date":"2014-09-09T14:34:19","date_gmt":"2014-09-09T14:34:19","guid":{"rendered":"http:\/\/www.piglets.org\/blog\/?p=146"},"modified":"2014-09-09T14:34:19","modified_gmt":"2014-09-09T14:34:19","slug":"upgrading-from-serendipity-to-wordpress-on-debian","status":"publish","type":"post","link":"https:\/\/www.piglets.org\/blog\/2014\/09\/09\/upgrading-from-serendipity-to-wordpress-on-debian\/","title":{"rendered":"Upgrading from Serendipity to WordPress on Debian"},"content":{"rendered":"<p>As you may have noticed, I have upgraded from <a href=\"http:\/\/www.s9y.org\/\">Serendipity<\/a>, which was creaking a bit, and seems to no longer be supported by <a href=\"http:\/\/www.debian.org\">Debian<\/a> to <a href=\"http:\/\/www.wordpress.org\">WordPress<\/a>. It was a moderately complex task, as I wanted to preserve backwards compatibility and a lot of content with mathematics and code.<\/p>\n<p>I installed the Debian package, and tried to follow the instructions on the Debian wiki but they are perhaps out of date. I got an error trying to setup the database, but found it was there and functional.<\/p>\n<p>I\u00c2\u00a0 then used this <a href=\"https:\/\/github.com\/ShakataGaNai\/s9y-to-wp\">excellent script<\/a> to help import the old serendipity data. It wasn't without problems, the script needed to be placed (on the Debian installed package) under \/var\/lib\/wordpress\/wp-content\/plugins\/ within a directory to be registered by WordPress as a plugin, but I got that working in the end.<\/p>\n<p>This was an attempt to preserve ID fields as well. It seems to have worked - which has simplified redirects (see below). Comments have been \"flattened\" as the script warned, and there's clearly a character-set issue here and there, but these weren't serious issues for me. Your mileage may vary.<\/p>\n<p>I found a good <a href=\"http:\/\/gehrcke.de\/wp-geshi-highlight\/\">plugin for GeHSI style code formatting<\/a> which I was using in Serendipity, albeit the syntax is very slightly different so I have some work to do editing a few entries (I don't want to attempt a global SQL regexp find and replace if I don't have to). I found this excellent seeming <a href=\"http:\/\/www.holoborodko.com\/pavel\/quicklatex\/\">plugin for Latex<\/a> and switched it into site-wide mode. So far, checking a few old articles, it JustWorks (TM).<\/p>\n<p>Some of my old posts have images in the serendipity media folders that will need moved, but I was keen to have links to the old blog redirect automatically. I was able to use<\/p>\n<pre lang=\"apache\">RedirectMatch permanent ^\/serendipity\/archives\/([0-9]+).* http:\/\/www.piglets.org\/blog\/?p=$1\r\n<\/pre>\n<p>in my Serendipity Apache configuration to jump to the new articles.<\/p>\n<p>I can start to dismantle the rest of serendipity, except for the media, quite soon now. It's nice to have a platform that respects multiple device layouts, and hopefully comment spam will be easier to control too. A sample of most articles show they render OK, there are a few gotchas, and I'll try to work through them in time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As you may have noticed, I have upgraded from Serendipity, which was creaking a bit, and seems to no longer be supported by Debian to WordPress. It was a moderately complex task, as I wanted to preserve backwards compatibility and a lot of content with mathematics and code. I installed the Debian package, and tried [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"vkexunit_cta_each_option":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[7],"tags":[64,16,67,66,65,62,61,63],"class_list":["post-146","post","type-post","status-publish","format-standard","hentry","category-11-free-software","tag-apache","tag-free-software","tag-geshi","tag-latex","tag-redirect","tag-s9y","tag-serendipity","tag-wordpress"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"jetpack_shortlink":"https:\/\/wp.me\/p52I4w-2m","_links":{"self":[{"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/posts\/146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/comments?post=146"}],"version-history":[{"count":7,"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/posts\/146\/revisions"}],"predecessor-version":[{"id":155,"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/posts\/146\/revisions\/155"}],"wp:attachment":[{"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/media?parent=146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/categories?post=146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/tags?post=146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}