Overview
Existing WordPress websites hosted on Windows servers need a specific web.config file to function. This is similar to how a Linux hosted WordPress site would need a .htaccess file for pages to load. In this guide we’ll step you through creating the required web.config file for your Windows hosted WordPress website.
Instructions
- Login to Plesk via your Control Panel area.
- Open the File Manager
- Navigate to the directory containing the website files:
In our example the website is located in the default directory “httpdocs” - Create a file called web.config and open it:
- Copy & Paste the below into your new web.config file:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="index.php" />
</files>
</defaultDocument>
<rewrite>
<rules>
<clear />
<rule name="WordPress Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<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>
<outboundRules>
<clear />
</outboundRules>
</rewrite>
</system.webServer>
</configuration>
- Save the file:
- Test your WordPress website to ensure it’s working.
If you need assistance please don’t hesitate to contact our friendly support team.