WordPress + SQLite

The one thing that really kept me from just installing WordPress and playing around with it was that it required MySQL to run. I don’t need a full-blown RDBMS on my server and I certainly don’t need MySQL (in the past I’ve always used PostgreSQL and in general I like to stick to what I know, especially when it comes to productivity tools). So I was pleased to find out that there’s actually a way to set up WordPress just using PHP5 and SQLite. This is accomplished by a neat plugin called PDO. It’s really easy to install so I wont’t bother with going into any details here.

But there is a catch: The implementation of PDO is slightly broken so when using it you’ll encounter some strange error messages. Problem is that PDO’s database class implements a version of the esc_sql function which is used to sanitize an array of strings for use in SQL queries. Instead of returning an array of the sanitized strings it returns a string which in turn causes the PHP function implode to throw up. The bug and it’s solution are described in detail in the blog post pdo-sqlite bug in wordpress.

Addendum for 07/29/2011:
Sadly, the description of the problem is not available anymore. But I found a summary that describes the fix.

I’m not the author of this fix and have no idea about the intricacies of PHP, so I am not the right person to answer your questions. But it appears that since writing this post the bug has been fixed and not manual editing is necessary anymore to get WordPress running with SQLite as database backend. HTH.