In this post I will walk your through the steps from start to finishing for installing WordPress on IIS. This installation is done on a development system for testing purposes of WordPress functionality on an intranet.
I wanted to be able to work with WordPress in a small controlled environment to edit/test functionality. Do this tests in a working production environment would be risky. I ideally needed to build a test environment. I decided to build a Windows system to host a WordPress site in an intranet using IIS.
At the end of the guide, I will show a few issues I ran into with image uploads and WordPress.org queries.
Disclaimer: Please review necessary file permissions before submitting installation in a production environment.
Install WordPress In IIS
Prerequisites
You will need to install and setup a few things that I will go over in the guide. The list below is in order of necessary install and configuration steps we will follow.
- IIS
- PHP
- MySQL Workbench
- WordPress
Install IIS on Windows
You will need to install IIS on your Windows system in the Windows Feature window via the Control Panel.

Below is a snapshot of the basics you will need to install.
NOTE: CGI will be used to install and configure PHP to work with IIS in a later step.

Now open IIS Manager. We need to ensure the service and site is running.

We will want to test the install and validate we can view the default webpage. Open a web browser and test http://localhost.

Nice. Now lets move onto the next step.
Configure PHP With IIS
Add PHP To System
Adding PHP support is critical when installing WordPress on IIS. This is how the server actively does the background tasks to edit and display pages as well as admin support. We will need to download PHP for Windows. For Windows IIS, the site directs us to us the non thread safe version. Download the zip.

Find where you downloaded the zip file and extract to a place you want. For my situation, I chose the root drive as shown below.

We will need to edit the system path to include this folder. Go into your System settings and look for the Advanced system settings link.

Under the Advanced tab, look for the Environment Variables button

Edit the Path variable under the System variables. You will need to create a New entry indicating the location you extracted the PHP zip contents.

Now you will need to reboot your system for it to take affect.
Now you need to create a php.ini file. This is the configuration file used for PHP on your system.
- Copy/paste php.ini-development
- Rename new copied file to php.ini

We will come back to this file later. We will move onto configuring PHP in IIS.
Configure IIS To Use PHP
We need to register the .php files in IIS Manager. Click on the Default Document icon in the Default Web Site.

Add index.php

We will need to add a handler mapping to use PHP. Click on the Handler Mappings icon.

The mapping will need to point to the php-cgi.exe in the PHP folder. View the image below as a sample on how to configure.

Test PHP Functionality on IIS
Here will will need to create a simple webpage with PHP in it to test the system is working.
On the top of the right pane, click Explore link to open the wwwroot folder for your site.

We will need to create a index.php file and add in the following code to test.
<?php
echo "Hello World!";
?>
<html>
<body>
<div>
<H1>Testing PHP...</H1>
</div>
</body>
</html>

If everything is successful, you should see the page below when you open a web browser to http://localhost.

Add MySQL Support In PHP
To add MySQL support to PHP, we need to edit the php.ini we created earlier. We need to add a support extension.
Note: Any extensions you will need to add to PHP are located in the <PHP path>\ext directory.
Go to the bottom and edit it like the image below.

Install And Configure MySQL Workbench
In the next steps we are installing and configuring MySQL Workbench on the system. MySQL is essential when installing WordPress on IIS. It is used to hold post and configuration data. You will need to download from MySQL Community Downloads. Choose the bigger MSI, this will add the proper dependencies needed during install.

Choose your setup type. I am chose Full.

The next step checks if your system has the required dependencies installed, if you don't it can add them. Click Execute.

Execute again to start the install.

Click Next if everything install properly.

Now its time to configure MySQL. Click Next.

I chose defaults for my situation.

Choose the strong authentication method.

Set your root password for MySQL. You can also setup a database user account here and their privileges which is a good practice for security.

Defaults selected here.

Also choose the default settings.

Click Execute to finalize the configurations set.

Click Finish if configurations were successful.

Test the configuration in the next step.

Enter in account credentials and test connection.

Execute to finalize configurations.

Finish.

Click Next to continue.

Install complete.

Add New Database To MySQL For WordPress
WordPress needs a database to manage all content. Here we will create a new schema just for WordPress.
Login to MySQL Workbench.

After successful login, you will see your console.

In the top Toolbar, look for the icon to Create a new schema in the connected server.

Give the new database a name. I named this example wordpress.

Click Apply on next window to create.

Done.

Now the database is ready for WordPress to take over.
Install And Configure WordPress on IIS
Finally, installing WordPress on IIS. First you will need to download WordPress.

Extract the contents of the zip to a location in your web server directory. Ex <system-drive>\inetpub\wwwroot\.

To install WordPress, you will need to navigate to the install.php file in a web browser. Ex. http://localhost/wordpress/wp-admin/install.php

During the installation setup, the wiziard will create the WordPress configuration file based on your input. Use the image below as a reference.

Run the installation.

Fill in the information in the next screen.

Install complete.

Click on the Log In link to test your login.

If successful, you will be redirected to your dashboard. To test the default site, go to http://localhost/wordpress.

WordPress and IIS Image Upload Fix
With a new install, there seems to be no issues with editing page text. There is an issue with image uploads.
- Image uploads in the Media Library
- Image uploads dynamically within a post
Also WordPress may have issues with loading the plugins / themes from their server in the Dashboard for your site.
I will show you how to fix these issues. They are permission issues in Windows as well as another needs PHP extension to add to the php.ini.
WordPress Fails To Load WordPress.org Plugin / Theme List
In the image below you can see what the error may look like. The issue is due to WordPress utilizing Curl to get the information from their server. If you see this, then you do not have curl enabled in your PHP.
An unexpected error occurred. Something may be wrong with WordPress.org or this server's configuration.

To fix this, we just need to add another extension to the php.ini file. Open the php.ini file in a text editor or similar and add extension php_curl.php.

WordPress Windows Temp Permission
IIS in Windows will use the Temp directory for image uploads. The files are temporarily uploaded there first, then when they are complete, they move to destination folder.
Open Windows Explorer and open <system-drive>:\Windows\. Find the Temp folder and right click to go to the Properties.

We will add IUSR to the folder with permissions to Read/Write.

Then we need to edit the php.ini file again to add the php_gd.dll extension for PHP. The GD extension is used when dynamically adding responsive images while editing posts.

Now the image upload should work.

All done. Everything should be working now. Hope this was helpful.