

We will now need to modify this file in order to make it work with SQL Anywhere. This is what allows you to plug in your own database access layer for Wordpress. This file name and location are important because the Wordpress software looks for this file when the site is accessed and, if it is present, it will use it instead of the default wp-db.php file. Starting with the standard Wordpress install, copy the wp-db.php file from the wp-admin folder into the file called wp-content\db.php. In our setup, I used Apache 2, PHP 5, Wordpress 2.3.3 and SQL Anywhere 10, and tested the solution on both Windows and Linux. This article assumes that you already have a web server installed and running with PHP support and SQL Anywhere installed on the machine. We will build a plug-in for SQL Anywhere that can be dropped into a standard Wordpress install and, with no other changes to the Wordpress code, allow you to use SQL Anywhere.

The application we are using to demonstrate this is the popular PHP blog application Wordpress.

In addition, SQL Anywhere offers robust, high performance, bi-directional synchronization that allows you to easily integrate your SQL Anywhere database application with your existing enterprise data center. SQL Anywhere is a small-footprint, self-managing, fully functional relational database that provides all of the features of an enterprise database, but can run on commodity hardware with a minimal amount of administration. In this article, we are going to cover the basics of how you could migrate any PHP database application to SQL Anywhere.
