I administer a Windows server which runs multiple instances of WordPress. Today I needed to install another instance, but the Gallery Installer through IIS kept failing. I resorted to installing manually, and wrote up this guide to installing WordPress on a Windows server manually. Hopefully this is what you are looking for!
This guide makes two assumptions:
- PHP is already installed on your server (PHP Install Guide)
- MySql is already installed on your server (MySql Install Guide)
1. Download the latest stable release of WordPress
The latest release is available for download a http://www.wordpress.org/download. Choose the .zip package.
2. Extract the .zip file
Locate and extract the .zip file (named “wordpress-[versionnumber].zip” to the location of choice. Typically this will be in your “inetpub>wwwroot” directory. Rename the default folder “WordPress” to your site name.
3. Add site in IIS
In IIS, right click on your server name in the treeview, and choose “Add Web Site…”. Enter your site name and path into the Add Site window. The important inputs here are the path and site bindings (domain name).
4. Create & Configure Database
Open the MySql command line tool, and log in using the admin credentials. First create a new database for WordPress to use:
|
1 |
CREATE DATABASE databasename |
Next, add the admin user to the new database:
|
1 |
GRANT ALL PRIVILEGES ON databasename.* TO "username"@"localhost" IDENTIFIED BY "password" |
Note: this code does include the quote marks
5. Set up wp-config.php
Wp-config.php is the file that contains all the critical settings for WordPress including database connection information. Locate wp-config-sample.php and rename it to wp-config.php.
Open wp-config.php using your IDE of choice, and make the following changes:
|
1 2 3 4 5 6 7 8 9 10 |
define('DB_NAME', 'database-name'); /** MySQL database username */ define('DB_USER', 'database-username'); /** MySQL database password */ define('DB_PASSWORD', 'database-password'); /** MySQL hostname */ define('DB_HOST', 'localhost'); |
6. Final Configuration
Browse to the new WordPress installation. If your domain is not already pointing to the site (bound in step 3), the easiest way to open your site is to add an entry to the windows hosts file. The hosts file is located at “Windows > system 32 > drivers > etc”, named “hosts.” Open this file using notepad (right click, run as administrator), and add the following entry
|
1 2 3 |
127.0.0.1 yourdomainname.com 127.0.0.1 www.yourdomainname.com |
Once this is saved, browse to the new WordPress installation using your browser of choice, and follow the onscreen prompt to create a user, name your site, etc.