Rehmat Alam A blogger who has fallen in love with coding! Here at, I share things that relate to coding, servers, E-marketing, and other related fields.

WordPress Custom Links Error Fix-How to Fix The Permalink Error

3 min read

Windows servers mostly create issues with WordPress. One of the most annoying bug is the error in custom permalink structures. WordPress default links don’t give you the good SEO, so they are needed to be customized. Apart from this, if you have migrated your blog from Blogger to WordPress, then you need the same permalink structure as your Blogger links there on WordPress to maintain the traffic and SEO of your blog.

But when you switch to custom permalinks, it causes errors sometimes and the errors are mostly caused with the windows servers. This is so, because WordPress was designed for Linux operating system originally. The better option to avoid such bugs is that you should switch to Linux hosting. Still if you love your windows hosting and don’t want to leave it, here is a simple solution. Follow the below steps to configure your WordPress blog.

This methods works in 99 cases out of 100. Run a custom installation of WordPress on your hosting. If you use the inbuilt installation of applications, and install the WordPress through it, then it causes errors. If you don’t know, how to install WordPress manually, follow the below steps. You should have the access to your control panel and file manager to do this. If you already know the installation procedure, then skip this step and scroll down.

How to Install Manually on a Windows Server

1. Download the latest WordPress package (.zip)

2. Upload the package to your server via any FTP client or through inbuilt uploader of your control panel

3. Unzip .zip file, open WordPress folder and transfer all files and folders from unzipped directory to the root directory of your domain

4. Go to databases, create a MySQL database and add a user to the created database and note down the details. i.e. database name, user name and password

5. Now navigate back to the root directory of your website where you have copied the WordPress files, open wp-config-sample.php and edit the database details in the specified locations in it

6. Save the changes and close the editor. Now rename wp-config-sample.php file to wp-config.php

7. Open a new browser window and enter your domain name. WordPress installation should initiate once you enter your domain name. If you have copied the WordPress installation files to any sub-directory, enter it to start the installation process

8. Follow the instructions and complete the installation

9. Your installation should successfully complete

How to Set Custom Permalinks

1. Now navigate to the settings in your WordPress dashboard ( and select Permalinks

2. Select your desired permalink structure and click on Save

3. WordPress will show you any of the following two messages:

Permalink structure updated. Remove write access on web.config file now!


Permalink structure updated. Update web.config file now!

To fix this and enable the custom permalink structure. edit web.config file or create it, if it isn’t present in the WordPress installation root directory. To edit this, go to your control panel again and navigate to the directory where you have installed WordPress. Look for web.config file, if you find it, then open it to edit and replace its code with the below provided code. If you don’t find any web.config file in the directory, simply create a web.config file. To create a web.config file, open notepad, paste the below code in it, click on ‘Save”, save as type all files and name it web.config. Then upload this file to the root directory of your WordPress installation. You are all done! Here is the code.

<?xml version=”1.0″ encoding=”UTF-8″?>





<rule name=”WordPress Rule 1″ stopProcessing=”true”>

<match url=”^index\.php$” ignoreCase=”false” />

<action type=”None” />


<rule name=”WordPress Rule 2″ stopProcessing=”true”>

<match url=”^([_0-9a-zA-Z-]+/)?files/(.+)” ignoreCase=”false” />

<action type=”Rewrite” url=”wp-includes/ms-files.php?file={R:2}” appendQueryString=”false” />


<rule name=”WordPress Rule 3″ stopProcessing=”true”>

<match url=”^([_0-9a-zA-Z-]+/)?wp-admin$” ignoreCase=”false” />

<action type=”Redirect” url=”{R:1}wp-admin/” redirectType=”Permanent” />


<rule name=”WordPress Rule 4″ stopProcessing=”true”>

<match url=”^” ignoreCase=”false” />

<conditions logicalGrouping=”MatchAny”>

<add input=”{REQUEST_FILENAME}” matchType=”IsFile” ignoreCase=”false” />

<add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” ignoreCase=”false” />


<action type=”None” />


<rule name=”WordPress Rule 5″ stopProcessing=”true”>

<match url=”^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*)” ignoreCase=”false” />

<action type=”Rewrite” url=”{R:2}” />


<rule name=”WordPress Rule 6″ stopProcessing=”true”>

<match url=”^([_0-9a-zA-Z-]+/)?(.*\.php)$” ignoreCase=”false” />

<action type=”Rewrite” url=”{R:2}” />


<rule name=”WordPress Rule 7″ stopProcessing=”true”>

<match url=”.” ignoreCase=”false” />

<action type=”Rewrite” url=”index.php” />






If you still face any difficulty, you can comment on this post. I’ll try my best to help you out fixing this issue.

Rehmat Alam A blogger who has fallen in love with coding! Here at, I share things that relate to coding, servers, E-marketing, and other related fields.

Linux or Windows Based Hosting Server for WordPress?

Due to its powerful features and user-friendliness, WordPress has become the first choice of bloggers. If you are a blogger and want to start...
Rehmat Alam
2 min read

How to Improve Page Load Time in WordPress

Although both servers and Internet connections in modern world have become robust, still it is believed by SEOs that load time is a part...
Rehmat Alam
3 min read

4 Replies to “WordPress Custom Links Error Fix-How to Fix The Permalink…”

    1. Sorry, the code was messed up due to Blogger to WordPress migration. I have fixed it now. Thank you for mentioning it.

Leave a Reply

Your email address will not be published. Required fields are marked *