WordPress 2.0.4

Building a Web Server, for Windows

Requirements

Download

Package(latest version) : latest.zip

Our Configuration

Notes

WordPress uses PHP functions defined under extension 'php_mysql' [mysql_connect()], vs. the newer PHP v5 extension 'php_mysqli' [mysqli_connect()], to connect to MySQL -- make sure that under php.ini, PHP extension 'php_mysql.dll' is present and uncommented (under PHP v4, 'php_mysql.dll' support is built in).

MySQL 4.1/5.0 in combination with PHP's extension 'php_mysql.dll' [the only PHP MySQL extension WordPress supports] can only use the older MySQL v4.0 hashing method for password authentication and will require the use of MySQL's 'old_password()' function to set the password for the user of the WordPress database.

Basic Setup

Place Files

Unpack directory 'wordpress' from file 'latest.zip', move under directory 'C:\www\'.

Configure 'wp-config.php'

Edit file 'C:\www\wordpress\wp-config.php', update the following fields...

Configure PHP

Note that php extension 'php_mysql' is built in by default under PHP v4; no need to uncomment or insert anything.

Edit PHP's configuration file 'php.ini', which is usually located under the system's 'C:\Winnt' [Windows 2000] or C:\Windows [Windows XP] directory...

Uncomment line...

extension=php_mysql.dll

Create WordPress MySQL Database and User

Access the MySQL shell...

C:\www\mysql\bin> mysql -u <user> -p<password>
[note that there is no space between '-p' and 'password', and that characters '<' and '>' are not typed]
[note that if password for MySQL user 'root' has not been set; leave out '-p<password>']

Create database 'wordpress' (main database which will hold all tables)...

mysql> CREATE DATABASE wordpress;

Create secured account with user 'wpuser' and password 'dbpassword' (secured account -- only accessible from 'localhost', access permitted only to database 'wordpress', only needed privileges granted)...

If using MySQL v4.1 or v5.0

mysql> GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost' IDENTIFIED BY 'dbpassword';
mysql> SET PASSWORD FOR 'wpuser'@'localhost' = OLD_PASSWORD('dbpassword');
[note password 'dbpassword' -- substitute in selected alternative]

If using MySQL v4.0

mysql> GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost' IDENTIFIED BY 'dbpassword'; [note password 'dbpassword' -- substitute in selected alternative]

Flush privileges and exit...

Configuration for Apache2

httpd.conf

Create file 'C:\www\Apache2\conf\wordpress.conf'...

<IfModule mod_rewrite.c>
LoadModule rewrite_module modules/mod_rewrite.so
</IfModule>

AccessFileName .htaccess
<Files ~ "^\.htaccess$">
	order allow,deny
	deny from all
</Files>

Alias /blog/ "C:/www/wordpress/"

<Directory "C:/www/wordpress">
	order allow,deny
	allow from all
	Options FollowSymLinks
	AllowOverride FileInfo

	AddType text/html .php
	AddHandler application/x-httpd-php .php
</Directory>

Edit file 'C:\www\Apache2\conf\httpd.conf', insert line...

Include conf/wordpress.conf
.htaccess [wordpress permalinks]

Create empty file 'C:\www\wordpress\.htaccess'...

Note that Windows will not let you create a file that starts with character '.' unless you...

Restart Apache

Setup

Open your browser and access url http://localhost/blog/wp-admin/install.php

At this point you should see the installation screen, then a form that asks for the title of your blog and your e-mail address, and finally a screen that displays a generated password for WP user 'admin'...

Testing

Access URL http://localhost/blog/ to view blog.

Access URL http://localhost/blog/wp-admin/ to administer blog.