Mon 6 Aug 2007
Installing Wordpress 2.2.2 on Windows 2003 Server
Posted by admin under Network , Windows , Server , SoftwareNo Comments
You’re looking to install Wordpress on your personal server, and don’t feel like learning Linux? Here’s your quickie guide to getting everything running quickly on Windows 2003 Server!
I’m writing this tutorial using a clean install of Windows 2003 Web edition, Service Pack 2, and fully patched up via Microsoft Updates. I’ve done this on two other Windows 2003 Standard Servers, both not fully patched up and one still on SP1, so this should be pretty universal.
The first thing that you want to do is make sure that all of the web components are installed.
- Open Add or Remove control panel
- Click Add/Remove Windows Components
- Click on Application Server and click Details…
- Check off Enable network COM+ access
- Click on Internet Information Services (IIS) and click Details…
- Check off Common Files, File Transfer Protocol (FTP) Service, and Internet Information Services Manager.
- Click on World Wide Web Service and click Details…
- Check off World Wide Web Service
- Click OK until you are back at the original Components Screen
- Click Next> to get the install process started. You’ll need the install CD or the CD copied to a network location.
- Once finished, go ahead and close everything.
Now we’ll go and download everything we’ll need for Wordpress:
- Wordpress 2.2 - Grab the .ZIP
- PHP 5.2.3 - Download both the .ZIP package AND the Installer
- MySQL Community Server 5.0.45 - Grab the Essentials package
- MySQL GUI Tools - Select the installer version
- David Catalano’s Handy PHP test files
Let’s start by installing PHP and making sure that it works.
- Double click the PHP installer
- Accept the license agreement, and leave the default installation location
- Select IIS ISAPI Module from the Web Server Setup screen
- Leave everything else default and just finish up the install
- Now take the PHP .zip package, and extract the contents to a new folder
- You’ll see that there are many more files in the .zip, just go ahead and copy all the rest of the files over.
- Open up the PHP installation folder, and edit php.ini in notepad (or another text editor)
- Find the line extension_dir = “./” and change it to point to your PHP installation directory. In the default case it will read extension_dir=”c:/program files/php/ext/” [NOTE: Make sure that you use forwardslash (/) an not the Windows typical backslash (\)]
- Since we’re going to use MySQL for the backend database, we need to enable the MySQL module. Uncomment the line ;extension=php_mysql.dll by removing the leading semicolon.
- Close and Save php.ini
- Next right click on My Computer and select Properties to enter the System Properties page
- Click the Advanced Tab, and then Envrionment Variables
- In the System Variables find the Path variable, click on it and click Edit
- The installer should have already added the first part pointing to the PHP root directory. Click into the Variable value: field, find the other PHP entry, and enter in another entry for the EXT subdirectory (in this case C:\Program Files\PHP\ext\;. Don’t forget to make sure that each entry is separated by semicolons)
- Click OK out of each window and close the System Properties page.
- Now we’ll setup IIS. Open the Internet Information Services (IIS) Manager from Administrative Tools menu
- Under IIS, click on Web Service Extensions and make sure that PHP: Hypertext Processor exists and is set to Allowed
- Expand Web Sites, right click on Default Web Site, and select properties.
- Click on the Home Directory tab and click Configuration…
- Scroll down the list until you find the .php extension. Click on it and click edit
- Click the Browse… button and select C:\Program Files\PHP\php5isapi.dll. Manually add quotes around the Executable path.
- Chave the Verbs to be limited to GET,HEAD,POST
- Tick off to Verify that the file exists, and click OK
- Click OK through all of the screens back to the Web Site Property Page.
- Click the Documents tab
- Click Add… button
- Enter index.php
- Click OK
- Repeat to add index.html
- Click OK until you are back at the IIS Manager
- Right click on the web server name, select All Tasks.. and select Restart IIS…
- Click OK to the dialog and let IIS restart.
- Close the IIS Manager
- Extract the contents of script_test.zip to the root of the web server (in this case c:\inetpub\wwwroot)
- Open Internet Explorer and point it to http://localhost/test.php
- If everything is working correctly, you should get a PHP informational setup page
- Go ahead and close all your open windows
With PHP up and running, it is time to install MySQL.
- Double click MySql Essential installer
- Select Typical install and let it go
- When prompted, select to Configure the MySQL Server now and click Finish
- Select the Standard Configuration and click Next>
- Make sure Install as a Windows Service is selected as well as Launch the MySQL Server automatically is slected. Do not select to Include Bin Directory in Windows Path. Click Next>
- Check Modify Security Settings and enter in a SECURE root password. do not check to Enable root access from remote machines. Click Next>
- Click Execute button to finish the configuration and exit the installer
- Launch the MySQL GUI Tools installer
- Run through a complete installation
- On the Start menu, enter Program Files and launch MySQL Administrator
- Enter localhost for the Server Host, root for the username, and what ever you created as a root password previously. Click OK
- Click on the Service Control item. Make sure that the MySQL Service is running
- Click on the Catalogs item
- Right click in the list of Schemata and select Create New Schema
- Enter in the name of what you want the Wordpress database to be called. I typically just use wp or wordpress. Remember this name for later
- Click on the User Administration item
- Right click in the list of users (right now only containing root) and select Add User
- Give the user a name (I use wordpress), give it a different secure password from root
- Click on the Schema Privileges tab
- Assign the user all privileges except Create_Routine, Alter_Routine, and Execute.
- Click Apply Change button.
- Click on Service Control tab then stop then start the MySQL service.
- Close the MySQL Administrator
So that’s really it for backend setup. PHP is installed and processing pages and MySQL is setup and ready to start recording your posts. Now lets get into setting up Wordpress.
- Unzip the downloaded Wordpress install into the wwwroot folder inside Inetpub. It should look like C:\Intepub\wwwroot\wordpress
- Copy and rename wp-config-sample.php to wp-config.php
- Open wp-config.php in a text editor
- Replace the information in the config file with the information setup previously in the spots for DB_NAME, DB_USER, and DB_PASSWORD. If you’re planning on running more than one blog, you can also set the table_prefix variable.
- Now point Internet Explorer to http://localhost/wordpress/wp-admin/install.php
- This will run the setup sequence and you’ll be just a few steps away from blogging.
- Procede to the next step, give your blog a title and your e-mail.
- That’s it! Your blog is done.
The last thing that we’ll do it set up FTP so you can upload themes and make updates.
- Open Internet Information Services (IIS) Manager
- Expand your server and FTP Site, you’ll see that there is a Default FTP Site
- If you’re not going to use FTP for anything else on this server, then the easiest thing to do is point the FTP directory to the wordpress directory. If you want to use FTP for something else, skip down to the info section at the bottom.
- Right click on Default FTP Site and select Properties
- Click the Home Directory tab
- Click the Browse… button to change the local path
- Point to to the wordpress directory, in this case it is c:\Inetpub\wwwroot\wordpress
- Check off Write permissions in addition to Read and Log Visits
- Click the Security Accounts tab
- Uncheck Allow anoymous connections
- You will get a warning stating that FTP sends passwords and usernames in clear text over the network, so you’ll want to set up a user with limited access rights and again, a SECURE password. (Discussion of how to set up a secure user is outside the scope of this topic, so hit up Microsoft’s site for more information regarding FTP Users).
- By Default, you’ll be able to use what ever local users you have setup to access the FTP site. To test open Windows Explorer and go to ftp://localhost, You’ll be prompted for your username and password then will get the directory listing.
Now that you’re up and running, of course you’ll want to customize the look and feel of your blog. Prebuilt themes is a great starting point, then you can move into the many plugins available for wordpress.
Other Notes:
If you’re also using FTP on your server but want to also use FTP for uploading wordpress files, you’ll need to create a FTP Virtual Directory.
- Open Internet Information Services (IIS) Manager
- Expand the server name and FTP Sites
- Right Click on the FTP Site and select New then Virtual Directory
- Click Next> and give the virtual directory an alias (such as wordpress)
- On the next screen, specify the path to the wordpress directory
- Allow Write permissions and finish the setup.
- The virtual directory will take on the security setup of the main FTP server. If you already disallowed anoymous connections, then so will the virtual directory
- To test open Windows Explorer and go to ftp://localhost/wordpress, You’ll be prompted for your username and password then will get the directory listing.
Have any additions or corrections? Please let me know! I’ll try to keep this updated with any changes or new versions as I try them.