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.

WP Db Abstraction

This plugin provides db access abstraction and SQL dialect abstraction for SQL Server. It is an mu (Must-Use) plugin AND also a db.php drop-in.

Before you begin you will need a properly configuration server and PHP installation. For help with IIS you can visit http://php.iis.net/ and ask questions in the forums. You will also need a working database extension. Check your phpinfo page to verify:

To use mysql you will need one of the following php extensions enabled:

  1. mysql
  2. mysqli
  3. pdo and pdo_mysql driver

To use sql server you will need one of the following php extensions enabled:

  1. sqlsrv
  2. pdo and pdo_sqlsrv driver
  3. mssql (non-windows environments with freetds)
  4. pdo and pdo_dblib (non-windows environments with freetds)

You can get more information and support for sql server and the sqlsrv extension at http://social.technet.microsoft.com/Forums/en-US/sqldriverforphp/threads

For a new WordPress install - you cannot install WordPress using SQL Server until the plugin and dropin are in place.

  1. Download wordpress, unzip the package and put the file in place.
  2. Download the plugin package.
  3. Upload wp-db-abstraction.php and the wp-db-abstraction directory to wp-content/mu-plugins. This should be parallel to your regular plugins directory. If the mu-plugins directory does not exist, you must create it.
  4. Put the db.php file from inside the wp-db-abstraction.php directory to wp-content/db.php
  5. Visit $your_wordpress_url/wp-content/mu-plugins/wp-db-abstraction/setup-config.php to generate your wp-config.php file
  6. Install WordPress normally

For a WordPress install already using the plugin:

  1. Download the plugin package.
  2. Upload wp-db-abstraction.php and the wp-db-abstraction directory to wp-content/mu-plugins replacing the existing files
  3. Put the db.php file from inside the wp-db-abstraction directory to wp-content/db.php

If you are using or intend to use plugins that also use a db.php dropin. You MUST make sure the only db.php file in your wp-content directory is the one used by wp database abstraction. Rename the db.php files from other plugins. For example, if you are using a plugin named foobar, rename the db.php file from foobar to db-foobar.php and put it in the wp-content directory parallel to the db.php file for wp-db-abstraction. DO NOT OVERWRITE the db.php file that is already present. Then add

include 'db-foobar.php';

to the bottom of the db.php file (there is an example in that file, uncomment it and change the name to the name your renamed the other db.php file to)

For a WordPress Install migrating from MySQL to SQL Server

  1. Log into your current site and export your data as an xml file
  2. Disable all your current plugins
  3. Back up your existing config.php file
  4. Download the plugin package.
  5. Upload wp-db-abstraction.php and the wp-db-abstraction directory to wp-content/mu-plugins. This should be parallel to your regular plugins directory. If the mu-plugins directory does not exist, you must create it.
  6. Put the db.php file from inside the wp-db-abstraction.php directory to wp-content/db.php
  7. Visit $your_wordpress_url/wp-content/mu-plugins/wp-db-abstraction/setup-config.php to generate your wp-config.php file
  8. Install WordPress
  9. Log into the newly installed system and import your data
  10. Reinstall and test your plugins

If you are using or intend to use plugins that also use a db.php dropin. You MUST make sure the only db.php file in your wp-content directory is the one used by wp database abstraction. Rename the db.php files from other plugins. For example, if you are using a plugin named foobar, rename the db.php file from foobar to db-foobar.php and put it in the wp-content directory parallel to the db.php file for wp-db-abstraction. DO NOT OVERWRITE the db.php file that is already present. Then add

include 'db-foobar.php';

to the bottom of the db.php file (there is an example in that file, uncomment it and change the name to the name your renamed the other db.php file to)

Requires: 3.0 or higher
Compatible up to: 3.3.2
Last Updated: 2011-12-23
Downloads: 13,915

Ratings

4 stars
4.4 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.

100,1,1
100,1,1
100,1,1
67,3,2 100,1,1
100,1,1 100,2,2
100,3,3 43,14,6
50,10,5
0,1,0 50,2,1
100,1,1 100,1,1 14,7,1
100,1,1 33,3,1
0,2,0
33,6,2
50,2,1
100,1,1
0,1,0
100,1,1