How to: Getting Wordpress running on WIMP
I have been running Wordpress now for a couple of months and found it is by far one of the most comprehensive and easy to use blog apps out there….
The question i have been asked a number of times now is “How did you get Wordpress to run under a WIMP (Windows Server 2003, IIS 6.0, MySQL, PHP) enviroment?”
My answer is “it was reasonably easy…”
That said I felt it would be usefull to post a How To here for people to read.
I am no IIS master by a long shot and didn’t just fudge my way through it myself. I spend a number of hours searching, reasearching different guides available out there.
I have put a reasonable amount of thought into how i should pass this knowledge on… Should i post a list of links to the info used or should i re-post other peoples work (giving them full credit of course).
I have decided that the latter is a better option as from previous experience somtimes the info just disapears and links die - this i didn’t want (I also didn’t really want to re-invent the proverbial wheel). So here goes, if you have any problems - post them here and I will attempt to help resolve them for you.
Credit where credit is due - the main place i got this info from was:-
http://www.swoofware.com/posts/2004/08/07/how-to-be-a-wordpress-wimp/
I have made some alterations and improvments where I felt nessesary using various other bits and pieces that took forever to find and I am not even going to attempt to find them again.
The following will help you get the minimum requirements up and running for Wordpress. The instructions are based on the following versions of software - and i would suggest that you use these versions to get it working - as i cann’t assure you that it will work on other versions. I know from my experience that i needed to back off the versions i was using to get it working.
Windows Server 2003 (SP1)
IIS Ver. 6.0
My SQL Ver. 4.0.25
PHP Ver. 4.4.0
Windows Server 2003 and IIS 6.0
This post assumes that you have Windows Server 2003 and IIS 6.0 running on your machine. You will need to find some other source of instructions for configuring them if you don’t know how.
Installing and configuring MySQL database server
Full instructions available from MySQL, everything you should need to get it up and running however is below.
1) Go to MySQL Downloads and download MySQL 4.0.25 database server. Select the Windows (x86) download that comes with the installer. Save the downloads to a directory on the machine you are installing on.
2) Install the MySQL database server and Administrator client. I installed to C:\MySQL.
3) Once installed, create a file called my.ini and save it to C:\MySQL. Open this file in your favorite text editor and add the following:
[mysqld]
basedir=C:/MySQL/
datadir=C:/MySQL/data
Save and close the file.
4) Add C:/MySQL to your system path (right click ‘my computer’ > properties > advanced > environment varibables), you will need to restart the server for this path to take effect. To avoid this restart you could create the file in your windows directory which is already in the path - however this is less tidy and makes finding it for future changes/upgrades more difficult.
5) To verify that MySQL is installed correctly, open a command prompt window and type the following command:
C:\mysql\bin\mysqld –console
You should then see a number of lines of text being the startup sequence. Once this is done, you should see something like this, which indicates that the server is ready to service client connections:
mysqld: ready for connections
Version: ‘xxxxx’ socket: ” port: 3306
6) To close the running instance of MySQL, open another command prompt window and type:
C:\MySQL\bin\mysqladmin -u root shutdown
7) To get MySQL running as a Windows service, type the following:
C:\MySQL\bin\mysqld-nt –install
Note: You might think that you could change to the C:\MySQL\bin directory and run all of your commands successfully from there. In theory, you should be able to do that. However if you have issues don’t come crying to me
Go to the Services control panel and start the MySQL service.
Installing and configuring MySQL Administrator
1) Go to MySQL Downloads and download the MySQL Administrator graphical client. Select the Windows (x86) download that comes with the installer. Save the download to the same directory that you saved the MySQL database server installer to.
2) Install the MySQL database server and Administrator client.
3) Run MySQL Administrator.
4) You will need to add a new Connection in order to connect to your database. Use the following settings:
- Connection: localhost
- Username: root
- Password: leave this blank, the default password is blank - but we will change this soon.
- Hostname: localhost
Apply changes
5) Once you are in MySQL Administrator, click on the User Administration icon.
6) Click on the ‘root’ User Account below and change the password.
7) Click on the ‘’ (the guest/anonymous) User Account below and change the password.
You will need to add a new database for your WordPress installation. Click on Catalogs. Right-click in the area below Schemata, and select Create new Schema and give it a name (wordpress is good).
9) You then need to create a new user to access this database. Click on User Administration. Right-click in the Users Accounts section and select Add new User. Enter a name in MySQL User field and enter the passwords. Click on Apply Changes
10) Right-click on the user you just created and select Add Host from which the User can connect. Enter localhost.
11) Click on the Schema Privileges tab for that user.
12) You need to assign the correct privileges to your new user to be able to work with your new database. Be sure that the localhost node under your new user is selected. Then under the Schemata column, select your WordPress database. Then click the < < button to assign all privileges to your new user when connecting through localhost.
13) Optionally, you can also click on the top node of the user and assign the same privileges for logging in locally to MySQL administrator with that account but most likely you will be logging in with the root account anyway.
14) Apply Changes
15) You can close the MySQL Administrator. Don’t forget your new root password however as you will need it to re-access the Administrator.
Installing and Configuring PHP
1) Go to PHP Downloads and download the PHP 4.4.0 zip package under PHP 4.4.0 Windows Binaries. We don’t want PHP 5 because WordPress 1.2 apparently has some issue running on that version. In addition, we don’t want the Installer version because it doesn’t come with all the extensions that we may want.
2) Extract the zip file to C:\ this should create a C:\php-4.3.8-Win32 directory structure which can be renamed to C:\PHP
3) Copy the file php4ts.dll in C:\PHP to C:\WINDOWS
4) In C:\PHP, rename the php.ini-recommended file to php.ini and copy it to C:\WINDOWS directory.
5) Create a file called test.php in the C:\PHP directory and add the following line of code:
< ? phpinfo() ?>
6) To test if PHP is working correctly open a command prompt window and run:
C:\PHP\php.exe C:\PHP\test.php
You should see a lot of HTML text rendered to the command prompt window.
Configuring IIS for PHP
1) Open the IIS Management Console
2) Right-click on the Web Sites folder and choose Properties
3) On the Home Directory tab, click the Configuration… button
4) On the Mappings tab, click the Add… button
5) On the Add/Edit Application Extension Mapping form, the Executable path should be C:\PHP\php4isapi.dll and the Extension should be .php
6) Click OK to add the mapping and OK again to close the Application Configuration window.
7) On the Documents tab, you will need to add index.php
For best results, restart IIS.
Installing and configuring WordPress
1) If you have made it this far, then we are doing pretty good. Go to WordPress > Downloads and download the latest release.
2) Now the 5 Minute Installation directions available at wordpress.org should work.
Let me know how you go - and again a big thanks to http://www.swoofware.com/
September 26th, 2005 at 10:40 pm
i tried this but it broke my linux? Can you help?
September 27th, 2005 at 8:05 am
Sorry you are very much on your own with your linux :)…you funny bugger Greg.
September 27th, 2005 at 1:07 pm
Greg - I am interested as to how you got IIS running on Linux? Can you help?
September 29th, 2005 at 12:23 am
I knew my post would help someone someday! I’m glad that you duplicated and updated the content as there have been a few times where I’ve come close to completely abandoning the site. Maybe someday I’ll get a chance to publish more content.
October 3rd, 2005 at 1:15 am
Yes thanks Matt, without your how to i would probably still be trying…
With any luck this article helps people as much as yours did me.
November 12th, 2005 at 4:47 am
Hiya,
Got all the majour stuff working allready and was hoping your guide would have the info on the index.php/stuf…… problem. IIS does not allow you to do that sort of thing.
I need it to get coment’s and permalinks etc
Any ideas I just get a 404??
November 12th, 2005 at 9:12 am
Ashleigh,
Did you add index.php to the websites documents tab in IIS?
Like this:-
Also under the document security tab - you should ensure that annon access is enabled in the authentication and access control section.
Other than that - possible problems are file permissions. You need to make sure that the internet guest account has access to the websites files… You may need to play with permissions a bit to get it all going - when i set it up i gave the files more permissions than needed and then backed them off once i knew what was going on.
If this dosn’t help - give me a bit more info on exactly what stage you are at… ie you have IIS/PHP/MySQL working??
November 12th, 2005 at 12:54 pm
Yeah managed to fumble through it, it was not that index.php was not being served, just that I forgot to have
cgi.fix_pathinfo = 1
cgi.force_redirect = 0
In the php.ini, that caused IIS to baulk when it saw what it thought was a directory structur of website/index.php/archives/…. instead of passing the procesing to the index.php file. All sorted now thanks anyhow
November 12th, 2005 at 12:58 pm
[…] For a more indepth guide on IIS and WordPress pop along to WalkerJohnstone.net a he has a decent guide to get the lot all happy together on one box. (I myself am using 2, one for IIS and PHP, the other fr MySql and SQL Server as it happens). […]
March 6th, 2006 at 6:27 am
Thank’s!Very useful!
October 9th, 2006 at 8:39 pm
Hey,
I am trying to install WordPress on IIS6 and Windows 2003 Web Edition.
The installation process is stuck. The following command just angs and refuses to do anything.
C:\mysql\bin\mysqld –console
October 9th, 2006 at 11:02 pm
I think it is done .. seems to be working … will check n revert !!! Thanx … yr article was of great help !!