WordPress Permalinks on a Windows Server

WordPress Permalinks on a Windows Server

If you’re anything like me you have multiple websites written in multiple languages. Why? Because programming is fun. So that leaves less options for what type of server you can use. One of the options is to host on a Windows based server. This is not the most ideal hosting solution for WordPress, but it works with some tweaks. One of these tweaks is to allow WordPress to use permalinks on a Windows server.

I have a Windows server hosted over at  A2 Hosting . They have excellent plans at really affordable prices. And, they have Linux plans too.

To get WordPress permalinks to play nice with Windows, a rewrite rule needs to be setup in the web.config file. If you already have a web.config file, copy and pasted the highlighted rewrite code within the system.webServer element. If you don’t have a web.config file, create the file in the root directory of your website. Then copy and paste all of the code below.

<?xml version="1.0" encoding="utf-8"?>
<rule name="Wordpress" stopProcessing="true">
<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" />
Categories: CategoriesWordPress
Tags: Tags

Leave a Reply

Notify of