[wp-hackers] alternative database support

Peter Westwood peter.westwood at ftwr.co.uk
Sat Oct 7 06:38:00 GMT 2006


On 7 Oct 2006, at 07:09, Michael K Dolan wrote:

> I've looked through wp-db.php and it seems supporting an alternate
> database (say db2, oracle or even postgresql) wouldn't be too
> difficult... has anyone tried porting wp to another database  
> before? Are
> there other complications than changing the syntax to match a new
> database?

The main complication you will come accros will be mysqlisms in  
queries - either those in the core or those that plugins pump through  
$wpdb.

There have been attempts to port to sqlite (http://trac.wordpress.org/ 
ticket/2317)

The best place to start is to write a extended version of the wpdb  
class which uses the alternative database engine and converts any  
mysqlisms in queries to work with the new database engine.

You code can be loaded in by the pluggable db code in 2.1 (http:// 
trac.wordpress.org/changeset/4154 and http://trac.wordpress.org/ 
changeset/4160)

westi
--
http://blog.ftwr.co.uk


More information about the wp-hackers mailing list