When I first installed WordPress I really liked it. But keeping it and it’s plugins up to date is a pain for me. Furthermore, running a PHP application feels kind of strange for me who feels disgust when thinking of this language. While my server does not run anything of great value, it is surely more secure not to run a dynamic application for something that is rather static.
So I decided to switch my blog to jekyll. The import of my old posts worked quite well, I just had to reformat them a bit. My layout just needed minor adaptions.
Permalinks of my WP blog were formatted according to the pattern moserei.de/index.php/:id/:slug
.
I could have generated a similar directory structure with jekyll, but I like the default format
(moserei.de/:year/:month/:day/:slug
). So I crafted a little rack app
which redirects requests to old permalink URLs to the new ones.
It is deployed inside a directory called index.php
and redirects requests to the abovementioned
permalink URLs and to index.php/?p=:id
to the corresponding articles. All other requests are redirected
to /
.
Comments are now managed by Disqus. Disqus has awesome tools for import and migration. I imported comments from a WXR file exported from WP and migrated the post URLs using a CSV file I extracted from WP’s database.