If you happen to be the unfortunate one tasked with getting Wordpress to work on a Windows Server, I sympathize with you. This is no fun task, but it is possible. That doesn't mean it is going to run smoothly though.

You have a few options to use to get this working:

  1. Web Matrix Installer
  2. Web Platform Installer
  3. Manually

I have found that what works best as of February 2017 is Web Platform Installer (WPI). I tried options 1 and I had trouble getting IIS to work with the Wordpress installation.

Once you've got Wordpress installed, you'll probably see that your permalinks will only work with the top option (domain.com/?123). The other options will give you errors when clicking links. The way around it is by utilizing a web.config file in the root directory of the Wordpress installation.

<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="wordpress" stopProcessing="true"> <match url=".*" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_URI}" matchType="Pattern" pattern="^/wp-content/" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.php" /> </rule> </rules> </rewrite> </system.webServer> </configuration>

This will make your links work as well as not break images upon uploading into the Wordpress Media Library. Thanks to Jonah Bitautas for his gist highlighting this issue!

© 2017. All Rights Reserved.

Proudly published with Ghost