Table of contents for Installing WordPress

  1. Installing WordPress (part 1)
  2. Installing WordPress (part 2)
  3. Installing WordPress (part 3)
  4. Configuring WordPress


I finally bit the bullet and figured out the issues I was having with PHP and MySQL on my home server so I could check out WordPress.  I’d had issues getting both free applications to be served properly on my server, and enough was enough!  I was determined to get them working over the holiday weekend.

As you may or may not know, all three “products” are available free.  Yes, that’s right, free.  No one makes money for their efforts writing or getting these products to work and do their magic (well, that is probably not entirely true – all their work must be released to the public).  I have somewhat of a philosophical problem with the business model since I am a software developer by trade myself.  I typically like to get paid for my efforts.  However, it appears that there are a myriad of ways people make money with them, and, for now anyway, I’m not willing to fight that fight.

Be that as it may, since I had previously downloaded both PHP and MySQL, I could have started with those versions.  Instead I decided to visit their web sites to see if a later version was available, one that hopefully had fewer bugs and more features – you know, what everyone wants :-) .  Before installing either product, I decided to see what versions WordPress required.  I first went to WordPress.com, which turns out to be a place where anyone can create a blog web site – again, for free.  Fortunately there was a reference there for people that wanted to host it themselves (that would be me; just call me a masochist :-) ).  After rooting around a bit at WordPress.org, I finally found a page describing the minimum requirements.  It said PHP version 4.2 or greater and MySQL version 4.0 or greater.  There was even a blurb about why not the latest versions.  Excellent.  Off I went.

MySQL

I started with MySQL since it sits under PHP.  There are two primary versions currently being supported – MySQL 4 and MySQL 5.  Based on the WordPress requirements, I decided that I shouldn’t try to push my luck and that I should instead be conservative for a change (well, when it comes to technology :-) ).  The MySQL web site is run by a company who actually does make money off their software, but only the enterprise versions.  The community edition is still free.  It took me a while to find the download, but I finally did.  Of course, v5 is much more prominent and I wanted v4, so I had to root around for it. Ah, there it is.

Fortunately (and also atypical for free software) there was an installer/configuration tool which walked me through the installation and initial configuration.  Once I had it installed, it took me a little bit to figure out how to interact with it.  There is a a command line tool in the bin directory called mysql.exe (oddly enough :-) ) that will allow you to navigate database objects, perform queries, etc.  Since I’ve been working with SQL Server from Microsoft for the past 10 or 11 months, I was fairly comfortable with the syntax, although I did have to use the documentation (yes, there is even documentation, can you believe it?) to figure out where user information is stored.  All-in-all installing MySQL was fairly painless.

PHP

Next was PHP.  At least the home page for PHP listed both versions 4 and 5 so the version I wanted was easier to find.  I downloaded the right version (again, v4 due to the WordPress requirements statement) and went to install it.  PHP did have an installer, but it was much more rudimentary than the one provided with MySQL, and it asked questions about extensions – oh, oh, which ones do I install?  Now, I remember the first time trying to install all kinds of extensions that sounded cool.  I decided this time I wouldn’t install anything that wasn’t strictly necessary.  I did choose to install it in C:\Program Files\PHP4 instead of the the suggested C:\PHP, though – I hate putting things at the root of my drives.  Once it was installed, next came the arduous task of configuring it.  The web site has instructions for configuring PHP for various operating systems and web servers, but the instructions also say to go through the php.ini file line by line so you’ll understand it.  Ugh!  I didn’t want to do that.  Fortunately the documentation on the site has enough information to help configure it correctly, and once I made the few minor changes to the php.ini file and the changes to the web site configuration in IIS Manager, it worked like a champ.  I was pretty surprised.  Here are the critical things to make it work on Windows Server 2003 + IIS 6:

  1. Copy everything from the dlls folder up to the root.
  2. Copy the php.ini-recommended file to php.ini.
  3. Make the following changes to the php.ini file:
    1. Set the error_log property to point to a valid file on the disk.  I set it to “C:\Windows\Debug\PHP4\Errors.log” after creating the PHP4 folder.
    2. Set the extension_dir property to the extensions folder in the PHP installation.  I set it to “C:\Program Files\PHP4\extensions”.
    3. Set the cgi.force_redirect property to 0.  They make a big deal about this on the web site for IIS, so I just did it even though I planned to use ISAPI.
  4. Make the following changes to the properties of the web site with which I planned to use PHP:
    1. On the ISAPI Filters tab, add an entry for PHP pointing to php4isapi.dll in the PHP installation folder.
    2. On the Home Directory tab:
      1. Set Execute permissions to Scripts only.
      2. Click Configuration and add an entry for .php to point to the ISAPI DLL.
  5. In the Web Service Extensions section of IIS Manager, create a new web service extension for PHP, again pointing to the ISAPI DLL.

That’s it.  After doing this, I was able to test out a very simple PHP file:

<?php phpinfo(); ?>

If you’ve installed it successfully, this will display information about the PHP software.

phpMyAdmin

The next step was to test PHP on top of MySQL.  There is another free tool call phpMyAdmin that provides an interface for doing this.  I decided once again to see if there was a later version than the one I had downloaded previously.  Getting this to work proved to be a lot more involved than I expected.

It’s getting late, and this is getting long, so I’ll finish this another day.  In the next installment I’ll finally get to the installation of WordPress :-) .  Stay tuned.