Apache, PHP, MySQL, ASP.NET, JSP and Perl Solutions for your Web Development and Hosting Needs on Windows.
A Complete Web Development and Hosting Platform for Windows.

WordPress 2.0.4

Building a Web Server, for Windows

Requirements

  • Apache 2.0, 2.2
  • PHP 4.4, 5.1
  • MySQL 4.0, 4.1, 5.0

Download

Package(latest version) : latest.zip

Our Configuration

  • Apache's path : C:\www\Apache2
  • MySQL's path : C:\www\mysql
  • Webroot : C:\www\webroot
  • Install to : C:\www\wordpress
    [note that WordPress will be placed outside of Apache's webroot for security reasons]
  • DIR to URL Alias : 'C:\www\wordpress\' > '\blog\'
  • URL access to WordPress : http://localhost/blog/
  • WordPress MySQL info...
    • database name : wordpress
    • database's username : wpuser
    • database's username password : dbpassword
      [note to substitute each occurrence of this password under this Guide, for your own alternative]

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...

  • define('DB_NAME', 'wordpress');
  • define('DB_USER', 'wpuser');
  • define('DB_PASSWORD', 'dbpassword');
    [note password 'dbpassword' -- substitute in selected alternative]
  • define('DB_HOST', 'localhost');
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...

  • mysql> FLUSH PRIVILEGES;
  • mysql> quit;

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...

  • Open Notepad
  • 'Save As...' empty file
  • Change 'Save as type' from 'Text Documents (*.txt)' to 'All Files'
  • Save files as '.htaccess'
Restart Apache
  • ...> net stop apache2
  • ...> net start apache2

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.

In the Spotlight

In the Spotlight

Developing and Hosting PHP+MySQL based websites and applications has never been simpler. The Web.Developer Server Suite provides a Platform & Framework on which to create standards-based CSS, XSLT, and XHTML sites running on PHP and MySQL. Save your time, focusing on core business. Reduce complexity and maximize your productivity.

Developers

Developers++

The Web.Developer Server Suite is more than just a Windows based Apache|PHP|MySQL Platform. Suitable for novices and professionals alike, a complete Hosting Solution is provided that is capable of creating and deploying websites and web applications both locally and on the internet. Create, test, publish and maintain your websites in-house, on your own server, where you are in full control.

Newsletter Signup

Newsletter Signup

Enter your e-mail address: