Freeing myself of WordPress

WordPress

WordPress is powerful software, which I've recommended frequently since I came across it two years ago. I've used it on several sites (including this one), and it has served me well.

Over time, though, a few things started to get me down. More and more, I found myself fighting WordPress rather than working with it. In one case I was forced to hack core WordPress files to prevent session data from being cleared between requests. WordPress is great blogging software, but I've been guilty of trying to do too much with it.

Having decided to use WordPress for my blogs and better suited tools for more complex projects, my frustrations abated, but did not disappear. I was still writing posts in HTML — I'm a control freak and can't live without definition lists — and generating 50 or more database records for each post by frequently previewing while writing.

I wanted to simplify everything. I wanted to write posts in Markdown, not HTML. I wanted to save posts as files, not database entries. I wanted to free myself of my dependence on WordPress, PHP, and MySQL in one fell swoop.

So, Mango was born. Mango is file-based blogging software built on Django, the excellent Python web framework. I conceived Mango to scratch an itch, and I'll bet that others out there are itchy, too.

Going without

I kept my dependence on WordPress plug-ins to a minimum, but there were a few which I found very useful.

  • Akismet. Commenting is handled by Disqus, which offers Akismet in addition to its own spam filtering.

  • WP Super Cache. Mango supports caching "out of the box", courtesy of Django. Caching currently occurs at the post level, which means that extra content such as comments are still generated dynamically. In the future Mango will include a second layer of caching, at the page level.

  • Subscribe to Comments. Mango does not currently support this feature, but soon will. Hang tight.

  • WP-DB-Backup. With Mango there's no database to back up. My posts are safe because I write and save them locally, and my hard drive is automatically backed up via Time Machine. (This is a recurring theme: Mango takes advantage of existing solutions to common problems.)

The plug-ins that I am thrilled to be without are those that prevent WordPress from carrying out an action, or attempt to undo an action after the fact. The existance of plug-ins such as No Curly Quotes is evidence of the fact that I am not the only one who refuses to let WordPress dictate terms.

Customization

WordPress has themes. The problem with the WordPress approach to themes is that a theme's template files and style sheet are tightly coupled. Themes should control the presentation of content – theme authors should not determine what appears on an "archives" page, for example, yet with WordPress this is exactly what they are expected to do.

As a result, WordPress themes often require customization, where by "customization" I mean hacking to pieces.

Django — and by extension Mango — has a different approach, which is incredibly simple. One provides Django with an ordered list of places to look for templates.

TEMPLATE_DIRS = (
    '/webapps/dcd/blog/templates',
    '/webapps/dcd/blog/mango/templates',
)

If Mango needs archives.dhtml it'll first look in the custom templates directory. If it finds that file there, it'll use it. If not, it'll use Mango's "archives" template. Whereas with WordPress it's all or nothing, with Mango you can create one or more of your own templates and have Mango fall back to the defaults for the rest.

Not that writing templates is an unpleasant task – Django's template language is extremely elegant.

Extensibility

There are no plug-ins for Mango. I like that. Many options are configurable, but Mango has no ambitions of being anything more than great blogging software. Mango is a Django app, and Django apps play nicely together. New components can be added to a site in the form of additional Django applications. In my opinion Python+Django is a more elegant, more feature-rich, more secure platform than PHP+WordPress.

Final thoughts

Undoubtedly, Mango is not for everyone. In fact, I would recommend Mango to only a tiny portion of bloggers. For most, the fact that WordPress serves content and provides a web interface for inputting and managing that content is a great thing, and I'll continute to recommend it on this basis. The success of MarsEdit, however, indicates that I'm not the only one who prefers to write posts in a desktop application than in a glorified web form.

Mango does not provide an all-in-one solution. This frees me to use the tools I know and love. I can compose a post in WriteRoom and publish it with Transmit (DockSend is fantastic!) or I can write in Coda as I'm doing now, preview locally, and hit the upload arrow when I'm ready to share my thoughts with the world.

Publish a post from Coda

Comments

Ah, this brings back a few memories. I bet it was fun to write.

I've greatly enjoyed working on Mango. I've appreciated the input I've received from my younger, smarter brother, too. We've had some passionate debates over certain design decisions, which has been invaluable.

Best of all, though, is the fact that I now get to use it. :D

Respond