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.

Known Limitations

  • this plugin requires PHP 5.0 + as it uses PDO. There is no workaround.
  • the database schema cannot be upgraded through the WP automatic systems. I am working on this: it is non-trivial
  • some plugins will not upgrade as they use the WP upgrade functions to upgrade their databases. Create statements issued through dbdelta() WILL work, however
  • some plugins will not install/work as they do use native mysql calls rather than the WP abstraction layer. This is contrary to WordPress API guidelines.

To Do

  • parameterise the database location to allow people to change the name and the location of the database
  • write a routine to allow upgrades/changes to the database schema. This is not easy as sqlite does not support the alter syntax to the same extent that mysql does. [We could just fudge this and leave old columns in the table]* examine and consider replacing some of the clunky code in the sqlite engine to use user defined functions in some cases (e.g. dates and if).
  • remove some of the clunky debug code
  • consider adding collation support.
  • remove inefficiency of object recreation at the end of the post-processing. it should be easier to keep the pdo resultset as an array of objects to start with.
  • consider using WP's own error handling class
  • consider revising the prepare->execute syntax to a pure query type syntax for certain types of query
  • consider altering the directory structure so that the majority of files can sit under the plugins directory and use the auto-updater.
  • or write an updater plugin (is that possible if they come from different sources?)

Attributions

Early versions of this plugin used a complete replacement for the WP abstraction layer. Thanks to Ulf Ninow for pointing out the value of inheritance to me and thus hugely simplifying the upkeep of the plugin.

Version Information

version 2.7.0 - 2010 January 13 changes in the WP installation code broke this plugin. Compatibility is now fixed through a rewrite of wp_install changes in 2.8.1 broke some other functionality. Essentially greater use of mysql >=4.1 functions means that it's a constant game of catch up to rewrite. Really the WP core team should go back to basics and use pure SQL ANSI syntax (particularly if the rumours about migration to MS SQL are true) Move to UDF's in place of a whole bunch of regex work. this should speed up execution. and other minor changes. still have to fix up the debug code. it's horribly clunky but we need very accurate feedback to debug failing queries...

Version 2.6.1 - 2009 June 13 fix error in Optimize queries - thanks fnumatic fix small error in multi-inserts leading to problem with importing from existing wordpress installation NB there is still a problem with the regex on multi-inserts, as yet no fix but the error should not manifest except as a small performance decrease

Version 2.6.0 - 2009 June 01 create a new query type to handle insert multiples fix bug with install routine and sqlite schema changes

Version 2.5.0 - 2009 May 04 [version 2.0.0 + has had a bunch of problems in it (inc 2.4.0). how these crept in is unknown.] fixes inconsistency between string and integer based data comparisons in sqlite

Version 2.4.0 - 2009 May 03 fix another installation problem linked to query buffering

Version 2.3.0 - 2000 May 02 added some more checking into the install routine to avoid perms problems cleaned up the date handling thanks to Nicholas Schmid. This will improve permalinks

Version 2.2.0 - 2009 April 29 create new tag and recommit because tag 2.1.0 was corrupt

Version 2.1.0 - 2009 April 21 added global $wpdb to the connect method in PDOEngine.php fixed some umask errors

Version 2.0.0 - 2009 April 03 overhaul of the sqlite code to use UDF's in place of regex (for the most part) overhaul of the base class to reuse the wpdb class by inheritance

Version 1.0.2 - 2008 June 29 version control issue. not all files were committed to svn in 1.0.1

Version 1.0.1 - 2008 June 28 Fixed bug where the comments did not display in Manage Comments due to the use of index hints in the mysql sql

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

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