This post describes how to enable IIS on Windows 7, along with enabling MySql and Php.

Note: You will need Administrator Access.

Enable IIS

In order to avoid permission issues when trying to edit a file with your logged in account, create a folder in a directory outside of innetpub, ensuring that the full path has no spaces.

For example: C:\webroot\

Next, to fix the security settings, right click on the new folder and add permissions for any users with, ISR, IUSER and Networking (full access)

Now, use the following guide to install IIS onto your machine. After first enabling, it will have your web root in the innetpub folder.

Since our folder is created, lets go ahead and relocate the server to use that!

Go in to the Default Web site and click: Default Web Site > Manage Web Sites > Advanced Settings > Physical Path Modify the path to be at the location you created at the top of this step.

Install PHP

Go back onto the “Turn Windows Features on or off” menu and Expand “Application Development Features” and then enable the “CGI” check box.

Download the latest stable version for PHP (Non Thread Safe) and unzip into a directory so that the path is similar to: c:\PHP5

Next, rename “php.ini-production” tp “php.ini”. Open the file, and edit to match the items below:

extension_dir = "C:\PHP5\ext"
log_errors = On
error_log = "C:\inetpub\temp\php-errors.log"
fastcgi.impersonate = 1
fastcgi.logging = 0
cgi.fix_pathinfo=1
cgi.force_redirect = 0
display_errors = Off
upload_max_filesize = 8M[change 8M to what you want to upload in WordPress]
post_max_size = 8M[change 8M to what you want to upload in WordPress]

Now, in the IIS manager, left click once on your server name, and then select “Handler Mappings”

Click Actions > Add Module Mapping and then enter the following:

Request path: *.php
Module: FastCgiModule
Executable: c:\PHP5\php-cgi.exe
Name: PHP_via_FastCGI

In the same Window, Click Request Restrictions > Mapping. Next, check off “invoke handler only if request is mapped to”, then click “File or Folder”. Now, click “OK” in all dialog boxes to accept changes.

In the IIS manager, click on your Default website, and then “Default Document”, and then add index.php to the list.

Finally, restart your Default Web Site, and check out the “Security recommendations” link in the Resource section for more ways to secure this instance.

Install MySQL

Download the latest stable version, but be sure to just skip to the download (near bottom of page).

For most uses the Typical install is fine. Please select all the MySQL defaults, and be sure to set a strong default password for root.

Note: Never use root on any of your Web applications.

Next, go into your php.ini file and uncomment:

extension=php_mysql.dll
extension=php_mysqli.dll

Save, then restart your IIS server.

Lastly, create a mysql user and database. Be sure to use a strong password here as well.

Install the URL rewrite plug-in for IIS. Then restart server

Go to the Microsoft Site to download the latest version.

The step will allow you to use “Pretty URLs” on your blog.

Download and install WordPress

WordPress.org always has the latest versions (4.1.1 at the time of writing). Also, check out the translations to download WordPress in your language, though some of these ay not be the latest.

To use WordPress just for something like a blog, unzip into your web root, and change the file name: C:\webroot\blog

To have WordPress at the root, move all the files instead the unzipped “wordpress” folder right into your root. C:\webroot\

Next, edit the file “wp-config.php” (you may need to rename the sample config). Change the WordPress user name, password, and database to match what was created after installing MySql.

Open up the secret generator to automatically generate secret keys. Paste this into your wp-config.php file.

Next, add the below line above the comment that asks you to stop editing: define('FS_METHOD','direct');. This will stop WordPress from asking your ftp information. Never use this external servers!

Save all these changes, then run one of the below addresses in your browser.

In a sub folder: http://localhost/blog/wp-admin/install.php At the root: http://localhost/wp-admin/install.php

Go through and set up your site name, and admin user as suggested on the page.

For issues, consult the WordPress Docs

Add Mime Types to IIS

If you are not able to see content like fonts, JSON, videos, etc., you may need to add the mime type.

If they are not above, they may be mentioned at: List of Common MIME types.

My Sample Web.config

Resources