How To Install WordPress on IIS 6.0
In the final article in this series I am going to demonstrate how to install and configure WordPress on an IIS 6.0 web server. WordPress is a free open source blogging platform which requires both PHP and MySQL and is renowned for its “Famous 5 Minute Installation”. However, it was because the installation was taking considerably longer than 5 minutes that I decided to start writing my own installation guide.
This walkthrough only covers the actual installation and configuration of WordPress itself; it is assumed that you already have PHP and MySQL installed and working correctly on your IIS 6.0 web server. If you have not already installed PHP you can do so by following the steps in this article here (http://www.iisadmin.co.uk/?p=4). If you have not already installed MySQL you can do so by following the steps in this article here (http://www.iisadmin.co.uk/?p=5)
Create the MySQL Database
WordPress uses a MySQL database as the back-end to store its content. To create a new MySQL database open the MySQL Command Line utility and execute the following commands
CREATE DATABASE wordpress;
CREATE USER ‘wordpress’@'localhost’ IDENTIFIED BY ‘wordpress’;
GRANT SELECT , INSERT , UPDATE , DELETE , CREATE , DROP , ALTER ON `wordpress` . * TO ‘wordpress’@'localhost’;
FLUSH PRIVILEGES;
We have now created a dedicated database which WordPress will use and an associated user account which has permission to add and delete content in that database.
Install and Configure WordPress
In this walkthrough I will be using the latest version of WordPress (2.0.4 at the time of writing) Start by creating a dedicated folder for the WordPress files and then extract the WordPress files into this folder. In this example I am going to extract the WordPress files to ‘C:\wp’
Now rename the file ‘wp-config-sample.php’ to ‘wp-config.php’ and then edit this file to provide the appropriate values for your environment. I have kept things very simple in this example and I have used a database called ‘wordpress’ and created a user called ‘wordpress’ with a password of ‘wordpress’. I am also running MySQL on the web server so my server’s hostname is ‘localhost’. As a result my wp-config.php file looks like this.
Configuring IIS
In this example I am going to host my WordPress blog on the PHP test web site which I created in the previous article (If you haven’t configured PHP and MySQL on your server yet its probably a good idea to read those articles before continuing)
I want to use a unique URL for my blog so I am actually going to create a new virtual directory on that web site for WordPress to use. Right-click on the web site and click New | Virtual Directory which will invoke the Virtual Directory Creation Wizard.
Click Next to specify an alias for the virtual directory. In this example I am going to use the name ‘WordPress’ as my alias.