Moving to a Static Blogging Platform

When you say, "blog" the first thing that comes to mind is usually WordPress. Like it or not, it is the world's biggest blogging platform. I personally don't like WordPress, which is why this blog used to run on Drupal. Two of the main reasons for that is that Drupal tends to be more secure and it is also much more flexible.

But while it may be more secure, it still needs to be updated from time to time. This means putting the site into maintenance mode, backing up the database and the files, uploading the new version, running the upgrade process, taking the site out of maintenance mode and checking to see that nothing broke. Not exactly a painless procedure.

Speaking of breaking, this is presuming that you have not upgraded PHP on your server, because that is a whole bucket of pain by itself. That is what happened here recently, causing the front page to display a horrible big fat list of errors.

I recently came across a few blogs that were using what they called a "static blogging platform" - whatever that meant. Horror of horrors, all of these blogs used static HTML pages... in this day and age of awesome server technologies.

Well, after the PHP upgrade fiasco, I had a choice of either upgrading to Drupal 7, or looking into another solution. It was going to be roughly the same amount of work. That was when I came across Pelican. Pelican is a static blog engine written in Python.

One of the beauties of a static site is that there is less to "hack". No potential security flaws in PHP, or Drupal, or MySQL as none of those is used. Just plain static pages which offer no real security issues of their own. Granted you're not immune from web server vulnerabilities, but at least you don't have to deal with application and PHP vulnerabilities.

In migrating this blog over to pelican, I used Christine Diog's guide, which uses the pelican-bootstrap3 framework. After doing the initial set up, I needed my content. Pelican has a tool which can import your stories from your existing blog by using the XML feed.

While this didn't produce a perfect result, it put me a whole lot closer to having all my content migrated across. Due to the change in format (Pelican uses reStructuredText), there were a number of issues, but they are simple to fix and I'm getting through them fairly quickly. On that note, I did not complete the fixes to all the articles, so a number of the articles may have bad links or reStructuredText errors in them. You're welcome to report which pages, but I do know about them anyway.

To get your content from your local machine onto your web server, you have a few options, including ftp (for those who can't move on) and rsync over ssh (which is what I'm using). It's simply a case of running "make rsync_upload" and watching it generate your blog and upload the files.

All in all I'm pretty happy so far. I've had to make a couple of tweaks and modifications, but they are a once off and then I don't need to worry about them again. I'll try to write up an in-depth account of how I moved over.

What do you think of the "new" Christians in OSS blog?

[ Image: Pelicans by Bert Knottenbeld ]


comments powered by Disqus