Now for MySQL. After a lot of looking at documentation I installed MySQL Administrator, a GUI tool which is freely available from the main MySQL website. I had earlier installed the MySQL DBMS which I downloaded from their site last week. Working with PHP is not at all new to me, but both WordPress and MySQL are totally new challenges, especially as PHP and MySQL were not originally developed for the Windows/IIS platform.
The first difficulty is to be able to set up a connection between MySQL Administrator and the DBMS instance. During installation you should have created a username and password which you have to enter. The trickery is in what hostname to use. I figured this would be the Windows host or Windows DNS name but these didn’t work. Eventually I tried ‘localhost’ and that does work, it seems you would have to use this when the Administrator and the DBMS are both running on the same server. Second thing is, there is no direct DB create tool provided in any of the GUIs. So I will still have to write a query to set up my DB for WordPress. But that is pretty easy to do and is covered in WordPress install instructions.
So firstly, set up a user account that WordPress can use to access its database. With the Administrator, this is very simple. Then, create the database. Using the Query Browser, this is a simple SQL statement and WordPress Help gives you the SQL to use. Finally, use Administrator to assign privileges on the new database to the new user account. The only real hiccup is that Administrator doesn’t seem to have any way to refresh its schema view to pick up the newly created database, without quitting and running it again.
The next major task is to finish WordPress configuration. This is what will show if this whole grand scheme is really going to fly. This is where we find out whether PHP and MySQL are properly installed and configured, and whether WordPress can work properly with this setup (PHP 5 is supposed to be an unsupported configuration for this release of WP).
Firstly, edit wp_config.php and fill in the values specified. Next, run the install script in the wp-admin subdirectory. It is here I strike my first snag; the message tells me that I appear to be missing MySQL in my PHP installation. Running a phpinfo script to see what is configured, I find that MySQL is not loaded as a PHP module. So I make the change needed in php.ini and restart IIS. This causes mysql to appear in phpinfo output as a loaded module. And now install.php brings me up properly at the first part of the WordPress install page. After completing this page I am presented with a login page. Unfortunately, logging in with the details specified just gives me a blank web page. If I go to the index page instead, it fails to load, giving me a warning and a fatal error about not being able to open ‘wp-blog-header.php’. As this file does exist, it looks more like a configuration problem, perhaps path info. It seems that perhaps the problem is that wp-blog-header.php is written by a script and it needs the proper permissions. However, the fix turned out to be very simple:
-
Open index.php
-
Change ./wp-blog-header.php to wp-blog-header.php in the require statement.
And that brought up the home page in all its glory.
So, we seem to have a working blog. However, it looks like I might have to customise a few more scripts in the same way as shown above, and I will have to work out how to change some of the blog’s settings to get the page looking like I would like it to. Then, the next big thing is to see if I can get WLW to work with it. That’s all for another day…