Andrew Hutchings: Using WordPress 3.1 on Drizzle
Since the GA release of Drizzle7 I’ve had several people asking me about how to convert their MySQL sites to use Drizzle instead. By far the most common one to crop-up is WordPress. This is aimed to be a simple guide to starting a new blog using WordPress 3.1 and Drizzle.
Initial Problems
WordPress by design is very MySQL orientated, for the most part this is good thing, but when trying to switch to another database for it there can be complications. An attempt has been made to create a plugin to use Drizzle, but unfortunately it has side-effects such as modifying your content if you happen to blog about anything related to MySQL or Drizzle. For the purposes of this blog post I have create a patch and will give instructions on how to use it below. If any WordPress guru has a way to make this into a good plugin, please get in touch!
Conversions Needed
Almost all the conversions for WordPress 3.1 revolve around the date. When creating a draft or any other table entry WordPress uses the date ’0000-00-00′ in several columns. In Drizzle we try to be closer to the SQL standards, and this means that the first valid date is ’0001-01-01′. A large majority of the patch is this particular conversion for the queries throughout the PHP code. The rest is to do with schema creation, to be specific:
- Drizzle has no LONGTEXT, TINYTEXT, etc… Just TEXT
- Drizzle doesn’t support multiple character sets, just UTF-8, so we need to drop the character set part of schema creation
The Patch
To patch your wordpress 3.1 source:
- Download the patch
- Enter the directory of your wordpress installation
- Run the following
patch -p1 < wordpress-drizzle.diff
You should now be good to run the install as normal. Noting that if you are not using the mysql-unix-socket-protocol plugin that you should tell WordPress to connect to ’127.0.0.1′ for a local database instead of ‘localhost’.
Converting an Installtion
If you already have WordPress 3.1 installed and using MySQL the patch combined with drizzledump’s migration function should still work but I have not tried this, so please backup first before attempting it.
URL: http://www.linuxjedi.co.uk/?p=172
_______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

