Alternatives to WordPress

Like a lot of people I’ve pretty much reached the end of my patience with WordPress as a solution for personal projects. I still recommend it as a good alternative to more heavyweight CMS solutions, but really would like something more lightweight and easy to manage for my own stuff.

This isn’t be an exhaustive list, but more like some notes for later follow up.

In addition to reducing complexity (e.g. avoiding dependencies on databases), I’d like to free myself from reliance on php and other dynamic infrastructures so I can publish in places where only static content is allowed — like Amazon S3 or Bitbucket.

First, of course, the completely no-CMS approach. Just a bunch of hand-crafted HTML pages with some basic css (like bootstrap). This is how I started out many years ago, but as I learned long ago it can become a management headache once the number of pages grows to considerable size (this blog has over 1,400 published posts the last time I counted).

Something less radical would be using a static site generator, configurable software that uses templates to create and manage web pages and site structures like folders.

Nikola is a python based static site generator that I tried out last night. It’s command-line centric and relatively simple to use, both attractive features for me. There’s even a server mode like Mercurial’s hgserve that lets you preview what the site will look like after making changes. Nikola uses reStructuredText or Markdown for markup, which is not a show-stopper but a disappointment as it would require I learn yet more niche markup languages. A number of extra python modules have to be installed on the machine used to manage your site code to get some functions to work, but all were available in the standard Fedora yum repo (or using pip)[1]. There is a method to export your content to a Github site. There is also a wordpress_import module[2], which is another plus. Having done WordPress migrations with scripts I had to write myself, I’m not eager to go down that lonely road again.

The main thing I like about Nikola is that you can do all your management on a workstation and then just push the resulting code (html, css and javaScript) to any web directory. Think of it as a kind of git for web sites. Platforms this would work on would include the bare bones web facilities provided by Amazon S3. You don’t need python or php on the web server itself. That’s a huge feature for me, because S3 is one of the places I’m considering as a future web publishing platform.

Pelican is another static site generator written in python that I haven’t tried yet but appears to work like Nikola, utilizing utilities to aid in the creation and management of content in a development environment that can then be exported to a static infrastructure like the one provided on Github. There’s a pelican import routine that includes support for WordPress. Content is in reStructuredText but supports Markdown extensions. As with git, success with tools like Pelican or Nikola requires adapting your workflow to the the tool’s methods rather than the other way around.

One unanswered question for me is how I can use these kinds of tools on the go. The web interface for WordPress didn’t require any special setup on any of my machines. But Nikola and Pelican, like git, at least require a local copy of their utilities and some way to “pull” and “push” content. It may be that git or some other DVCS could provide the necessary file deployment capabilities. Or I could just go back to a file transfer client like FileZilla to handle it manually.

[1] I cheated a little on my first setup of nikola by using yum to install the current package and its dependencies. But this was only a short term solution. Eventually I had to use pip to upgrade everything — after first removing the python-nikola package and then re-installing via pip. When you get there just make sure the python-devel package is installed first. A lot of nikola dependencies require the python header files and you’ll have a mess on your hands if you miss this (like I did!).

[2] Python dependencies for wordpress_import include dateutil, natsort, webassets and phpserialize (to avoid having to use the “–no-downloads” option). The importer is still highly experimental and in my tests had lots of issues. One was a problem with the REDIRECTIONS parameter in that caused “nikola build” to throw a “ERROR: Task generation ‘render_site’ has duplicated definition of ‘redirect:output/mysite.html” error. I finally got around this by commenting out REDIRECTIONS. This was a poor solution that I’m still working on fixing.

This entry was posted in Development, System Administration, Web on by .

About phil

My name is Phil Lembo. In my day job I’m an enterprise IT architect for a leading distribution and services company. The rest of my time I try to maintain a semi-normal family life in the suburbs of Raleigh, NC. E-mail me at philipATlembobrothersDOTcom. The opinions expressed here are entirely my own and not those of my employers, past, present or future (except where I quote others, who will need to accept responsibility for their own rants).