I've been blogging with Wordpress for the last 5 years on and off. It has some great features and is very easy to use, but it's not for me. This series of posts documents my transition from Wordpress to Pelican.
Part 1: Motivation and Decisions
What's Wrong With Wordpress?
There are a few things about Wordpress that have been bothering me lately
- Comment Bots
As with anything that relies on server-side scripting, there is performance hit when loading pages. I've been running my blog on a Linode 1024 VPS ($20 per month) and had found that I had to move from Apache to Nginx to get decent performance with Wordpress. Adding Caching to the equation with one of the many caching plugins available has also helped, but this is a rather complex solution. Another performance bottleneck is the database...
Wordpress requires a MySQL database in the back end. I am not a big MySQL fan and would prefer to run Postgres or MariaDB but this isn't officially supported in Wordpress right now. Not only is a performance bottleneck, but it is also another thing that needs to be backed up.
The Backup/Restore capabilities of Wordpress are decent, but I've always failed to find a solution that works for me. I've been relying on having a zip of the database emailed to my Gmail in the past which proved to be unreliable. Finally when I migrated to using Markdown for all of my blogging, I kept local backups of every post in Dropbox (although this didn't include any of the images in the post).
I've been using Disqus for comments since 2010, and I've been very satisfied with the service. The one issue I have with Wordpress right now though is that I have 1500+ comments on my blog that have been posted directly to the wordpress comment system by bots (effectively bypassing Disqus). The only option I can see for removing these (other than a SQL query) is to delete 20 at a time through the UI. The issue seems fixable using a fix posted here but this won't persist through theme updates.
My final concern is portability. If and when I decide to move hosts (which I have done 3-4 times recently) re-creating my Wordpress site is rather labour intensive. I like the flexibility of VPS hosting so I can run multiple applications on a single server (e.g a WebDAV server or an IRC bouncer) and I don't want to sacrifice that for Wordpress. Spinning up a LEMP stack and re-creating my configurations is just not scalable any more. I want my own PaaS, where I can host each of my applications in portable containers. Then I can just deploy the container to a new host with all of my customizations intact.
A Static Site Generator will fix all of my performance/complexity/backup related issues. Static sites are fast, there is no need for a database and I can keep the whole site under source control.
A quick google seemed to suggest that both Octopress and Jekyll came highly recommended. While these both looked good, I would have preferred something based on Python as it is easier for me to extend and customize.
This led me to Pelican
- It supports all of the essential features for blogging
- Including using Disqus for comments
- I can work in Markdown, in a text editor with no need for an Internet connection.
- It's extensible via plugins
- It works on Heroku using the Pelican Custom Buildpack
Once I've created a static site, I need somewhere to host it. I'm a big fan of Docker and I like the idea of having my applications in containers on one VPS. If I want to move an application, I just move the container to another host, no configuration necessary. I really like the Heroku workflow of using
git push to update the application. The only downside of Heroku is that the $ per dyno is a little steep when you move past 512MB RAM when compared to any other VPS provider (Linode, DigitalOcean, DreamHost to name a few). If only I could have my own docker-powered mini-Heroku...
A Static Site Generator, with Git for source control is my ideal platform for blogging. I have total control over both the site and the content and the Git is all the backup I need.
Using PaaS allows me to host my blog (and other applications) in containers that encapsulate all of the dependencies, configuration etc... The combination of these fixes all of my blogging problems and allows me to focus on creating good content.
Stay tuned for Part 2: The Wordpress to Pelican Migration and Part 3: Publishing to PaaS with Dokku