WP DB Driver
This plugin adds an improved database layer to WordPress. It allows you to do more then the default one and is always up-to-date with the changes core makes. mysql_* functions The mysql_* functions are officially deprecated for PHP 5.5 and are throwing E_DEPRECATED errors. On https://core.trac.wordp
About this tool.
This plugin adds an improved database layer to WordPress. It allows you to do more then the default one and is always up-to-date with the changes core makes.
mysql_* functions
The mysql_* functions are officially deprecated for PHP 5.5 and are throwing E_DEPRECATED errors. On https://core.trac.wordpress.org/ticket/21663 there is discussion on this topic.
This plugin reflects those discussions.
Why should I use this plugin?
You should use this plugin if you want to start using PDO / MySQLi for WordPress.
Getting started.
- 01Verify that you have PDO or MySQLi
- 02Go to the settings page to install db.php or copy wp-content/db.php to your WordPress content directory ( wp-content/ by default.
- 03Done!
Frequently asked questions.
Help, I’ve broken my site!
You can visit http://yoursite.com/?wp-db-driver-emergency-override=1 (replace yoursite.com with your real WordPress blog address) to temporarily disable this plugin. Then you can login to your admin to deactivate the plugin and restore your site’s functionality.
If you need to uninstall manually, you should remove the plugin folder as well as wp-content/db.php .
In what order are the drivers picked?
PDO > MySQLi > MySQL
How do I specify a driver?
In your wp-config.php, add a new constant:
define( 'WPDB_DRIVER', 'wpdb_driver_pdo_mysql' );
You can specify wpdb_driver_pdo_mysql , wpdb_driver_mysqli , or wpdb_driver_mysql . Any other driver will cause an error.
Which driver is best for my site?
They should all function equally well for WordPress. The MySQL extension is being retired. In PHP 5.5, using this extension issues E_DEPRECATED errors. In PHP 5.6, it will no longer be available. The two alternative drivers are PDO and MySQLi. If WordPress switches to MySQLi or PDO, some cool new features become available to developers.
http://net.tutsplus.com/tutorials/php/pdo-vs-mysqli-which-should-you-use/