How to install WordPress on IIS

Tutorials, Web Development

Wordpress hosting is dominated by linux-based platforms using mostly Apache on Nginx setups. But if you need to run a website from a Windows machine or VPS, IIS is probably the right way to go. Although there are some tweaks that have to be made, you can easily get your Wordpress instance running in less than 30 minutes.


  1. Microsoft IIS 7 or higher
  2. PHP 7 (recommended version)
  3. MySQL-compatible database

Create a new Site on IIS

Start by creating a new directory for your WordPress website in the default location for IIS websites (usually C:\inetpub\wwwroot\). Download the latest WordPress package from the official website and extract the contents into that directory.

How to install WordPress on IIS

We also need to grant read/write permissions for IIS to the wp-content directory so that WordPress will be able to save and modify files (e.g. when installing plugins or uploading files). Right click on the website directory and open up Properties. Head to Security and click Edit. Then, set the Modify permission for IIS_IUSRS (IIS user group) and IUSR (default IIS user).

Next, open the IIS Manager and create a new website in your server instance. You can do that by right-clicking Sites in the left pane and choosing Add new website.

wordpress on iis

Enter your desired website name (this is just for identification within IIS) and point the physical path to the directory we’ve just created. Next, enter the host name your website will be available from. This can be the domain pointing to your IIS machine or a virtual host you’ve created for local development in the system hosts file. Confirm by clicking OK.

install wordpress on iis

Your WordPress instance is already running, but we need to assign the IUSR user to it so our site will have the access rights we’ve just specified. In the left pane, select your newly created website and open Authentication on the right. Edit Anonymous Authentication and set IUSR to be the specific user.

install wordpress iis

Fix access permission for PHP uploads

At this point our website should be up and ready to run but we need to ensure that IIS has enough access rights to handle PHP file uploads. Otherwise, requests for files uploaded through WordPress will result in an error 500.

The reason for this is that PHP doesn’t set access rights for IIS when moving an uploaded file to the website directory (e.g. /wp-content/uploads). In order to fix this we have to grant Modify access rights for IIS_IUSRS to PHP’s temporary directory (usually C:\Windows\Temp but you can check if your php.ini configuration says otherwise).

Open Properties for C:\Windows\Temp, go to Security and click Advanced. First, click Enable inheritance so access rights can be passed down to files and subdirectories.

How to install WordPress IIS

Next, select IIS_IUSRS on the user list (or add it if not present) and click Edit. Set the Modify permission to IIS_IUSRS (IIS user group) and set it to affect only child objects.

wordpress iis

Install WordPress on IIS

You can now go to the domain you’ve specified in IIS and check if the website’s running. Open http://yourwebsitedomain/readme.html for instructions on how to install WordPress on IIS.

After installation there are  couple of things you might want to configure in order to make the most of your WordPress instance.

Enable permalinks

In order to use the user- and SEO-friendly “Pretty permalinks” feature in WordPress, we need to enable URL rewriting. For this to work you need to have the URL Rewrite module for IIS installed.

Next, we need to create a web.config file in the root directory of our website. Add the following rewrite rule to the webserver configuration:

<?xml version="1.0" encoding="UTF-8"?>
		  <rule name="Wordpress" patternSyntax="Wildcard">
			  <match url="*"/>
			  <conditions logicalGrouping="MatchAll">
				  <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
				  <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
			  <action type="Rewrite" url="index.php"/>

Fix static file serving

By default, IIS is configured to serve only a handful of static files properly (images, plain text files). If you’re planning to use web fonts, SVGs, videos or PDFs, you should declare them in your web.config file like this:

<?xml version="1.0" encoding="UTF-8"?>

		<!-- Proper svg serving. Required for svg webfonts on iPad -->
		<remove fileExtension=".svg" />
		<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
		<remove fileExtension=".svgz" />
		<mimeMap fileExtension=".svgz" mimeType="image/svg+xml" />

		<!-- HTML4 Web font mime types -->
		<!-- Remove default IIS mime type for .eot which is application/octet-stream -->
		<remove fileExtension=".eot" />
		<mimeMap fileExtension=".eot" mimeType="application/" />
		<remove fileExtension=".otf" />
		<mimeMap fileExtension=".otf" mimeType="font/otf" />
		<remove fileExtension=".ttf" />
		<mimeMap fileExtension=".ttf" mimeType="application/octet-stream" />
		<remove fileExtension=".woff" />
		<mimeMap fileExtension=".woff" mimeType="font/x-woff" />
		<remove fileExtension=".woff2" />
		<mimeMap fileExtension=".woff2" mimeType="font/x-woff2" />
		<remove fileExtension=".crx" />
		<mimeMap fileExtension=".crx" mimeType="application/x-chrome-extension" />
		<remove fileExtension=".xpi" />
		<mimeMap fileExtension=".xpi" mimeType="application/x-xpinstall" />
		<remove fileExtension=".safariextz" />
		<mimeMap fileExtension=".safariextz" mimeType="application/octet-stream" />
		<!-- HTML5 Audio/Video mime types-->
		<remove fileExtension=".mp3" />
		<mimeMap fileExtension=".mp3" mimeType="audio/mpeg" />
		<remove fileExtension=".mp4" />
		<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
		<remove fileExtension=".ogg" />
		<mimeMap fileExtension=".ogg" mimeType="audio/ogg" />
		<remove fileExtension=".ogv" />
		<mimeMap fileExtension=".ogv" mimeType="video/ogg" />
		<remove fileExtension=".webm" />
		<mimeMap fileExtension=".webm" mimeType="video/webm" />
		<!-- Other types -->
		<remove fileExtension=".pdf" />
		<mimeMap fileExtension=".pdf" mimeType="application/octet-stream" />
	  <!-- other settings, e.g. rewrite rules -->

Enable Caching

Caching can significantly speed up your WordPress website by serving pre-generated content without calling PHP scripts and database queries over and over again. This is easily achieved with WinCache and WordPress plugins.

Unfortunately, installing WinCache extension from the IIS homepage may break WordPress plugin updates. This is easily fixed by installing the latest repo version manually.

Download the latest development version from the WinCache SourceForge and extract it to your PHP extension directory (e.g. C:\Program Files (x86)\PHP\v7.0\ext).

Next, you only need to install a WordPress plugin that will handle the caching. Double-check the plugin platform support! As of now, the popular WP Total Cache won’t work with IIS. We recommend using WP Super Cache instead, as it supports IIS and WinCache.

Check out other iOS development tutorials on our blog: JetLobster ruby local APNs testing tool.

Arthur Krupa CDO, founder

Designer by profession, and an engineer at heart. At Zaven he supervises everything connected with visual communication and user experience. On quiet evenings, he enjoys watching documentaries, playing the piano or reading a book. Arthur has a passion for trekking and climbing, that’s why he catches himself daydreaming about mountains far far away...

Popular posts

Flutter application template with GitHub Actions

Flutter application template with GitHub Actions

This article explains how to create Flutter application template with GitHub Actions to save yourself time and nerves.

Read more
Augmented Reality as a trend in Mobile Development

Augmented Reality as a trend in Mobile Development

3D maps, realistic games, virtual showrooms and fitting rooms, interactive participation in a conference or concert, visiting museums and exhibitions. These are just a few examples of where Augmented Reality can be used. Applications created with the help of AR effectively combine the real world with the virtual one. Can your business also benefit from […]

Read more
How to use Natural Language Processing in Mobile App?

How to use Natural Language Processing in Mobile App?

The ability to communicate and interact using language is a remarkable skill. It distinguishes humans from other species and machines. Even the most advanced systems and technologies need specific, defined commands to take action. But what would happen if an application could interpret our language and, importantly, recognize the context of our speech? This is […]

Read more
Mobile Apps

Get your mobile app in 3 easy steps!


Spec out

with the help of our
business analyst



design, implement
and test, repeat!



get your app out
to the stores

back to top