Setup WordPress on Windows-Server, add web.config


If you want to setup wordpress on a windows server you will probaply run into the problem that your subpages and posts aren’t displayed.

This is because the nice-urls of wordpress are routet by an .htaccess-File. These files are for linux servers and are not interpreted by windows servers. The pendant for a windows server is the web.config-file.

WordPress web.config file

Just create a new file called web.config in the base-folder of your wordpress-instance and paste this code.

<?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" />

Your website should work right away. If it doesn’t you can go to the settings -> permalinks page and save it.

If you need a web.config for a wordpress mulitsite check out this page.


Please enter your comment!
Please enter your name here