WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

PDO (SQLite) For WordPress

This 'plugin' enables WP to use databases supported by PHP's PDO abstraction layer. Currently, mysql and sqlite drivers are provided.

WordPress has for a long time, and for good reasons, been locked into using mysql as its database storage engine. There is a good discussion of 'why' in the codex

But this design choice has ramifications; not least because mysql's implementation of sql is not standard. Even with the use of the EZSQL abstraction layer bundled with WordPress, this makes plugging in other databases very difficult.

PDO For WordPress is a step towards eliminating this difficulty. Think about this 'plugin' in four steps:

  1. the basic layer takes all queries and separates out the variables from the language. It replaces each variable with a placeholder as well as stripping mysql specific 'nasties' like the slash-escaping and backticks.
  2. then a language specific driver steps in and rewrites the query to use its own native constructs or (in the case of SQLite) pushes the query into some special user-defined functions
  3. the basic layer then puts it all back together and runs the query, finally ...
  4. returning the whole thing to the EZSQL abstraction layer so that WordPress doesn't know that anything has gone awry

See below/other notes for details of known limitations

Tags:

Requires: 2.3.0 or higher
Compatible up to: 2.9.2
Last Updated: 2010-1-14
Downloads: 25,054

Ratings

4 stars
4.8 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

0,1,0
100,1,1 100,1,1
100,1,1
0,1,0 100,2,2
100,4,4
25,4,1
38,13,5
100,1,1
0,2,0
29,7,2
100,2,2
100,1,1
67,6,4
50,4,2
0,1,0
0,1,0
0,2,0