Install lighttpd and php5-cgi
apt-get install lighttpd
apt-get install php5-cgi
Enable the fastcgi module and the php configuration with
lighty-enable-mod fastcgi
lighty-enable-mod fastcgi-php
Reload the lighttpd daemon
service lighttpd force-reload
To test if it’s working create the file /var/www/index.php with the following contents:
<?php phpinfo(); ?>
Install sqlite and the php sqlite module
apt-get install sqlite3
apt-get install php5-sqlite
Install wordpress as usual, however ensure to use version 3.1.2 otherwise the PDO module wont work. Older versions of wordpress can be downloaded from their archives here: http://wordpress.org/download/release-archive/ alternatively wordpress version 3.1.2 can be downloaded directly here.
Next download the WordPress PDO (Sqlite) plugin from its official website here: http://wordpress.org/extend/plugins/pdo-for-wordpress/ or alternatively you can download the PDO plugin directly from here.
The instructions that follow next are directly from the official wordpress PDO plugin website:
So … to install PDO For WordPress please do the following:
Step 1: unzip the files in your wp-content directory. After unzipping the structure should look like this:
wp-content
->plugins
->themes
->pdo
db.php
index.php[maybe]
The key thing is the presence of the pdo directory and the db.php file in the ‘root’ of the wp-content directory.
Step 2: Edit your wp-config.php file so that this line of code is placed directly after the define(‘COLLATE’,”); line:
define('DB_TYPE', 'sqlite'); //mysql or sqlite
As part of the general wordpress installation you should define your secret keys too (in wp-config.php)
Once that is complete, you then need to edit the following file:
/var/www/wordpress/wp-content/pdo/wp_install.php
Search for the following line:
$message = __('<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you.');
and replace it with the line below:
$message = __('<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you.<br><br> ' . $random_password);
Once that’s complete you can then run the worpress installation script as usual from your web browser:
http://example.com/blog/wp-admin/install.php
Finally once you have logged into wordpress, all that remains is to update your wordpress installation to the latest version which should go through without an issue.