How to Set Up Wordpress Pretty Permalinks in a Windows Environment Running IIS?

Default Wordpress URL looks like http://mydomain.com/?p=123. It is not a user-friendly SEO URL. Inorder to achieve the SEO friendly URLs, you can use Wordpress Permalinks. After enabling the permalinks, you will see the category, tag, title, and post in the URL. You can also use keywords inside your URLs. Following steps will be helpful to set up Wordpress Pretty Permalinks in a Windows Environment Running IIS.

  1. Login to your Wordpress Admin. It is https://mydomain.com/wp-login.php

  2. Go to Settings >> Permalinks.

  3. At Common Settings, choose the required permalinks structure that you want to use. Here, we have chosen the Post name most used by SEO Expert. postname is the unique identifier to locate your Wordpress post from the DB. Wordpress custom structure will also allow you to structure of website URL which you want.



  4. Once you select the version, remove the /index.php and only add /%postname%/ and click on Save Changes Button. In this case, if your Wordpress page named blog.php, it will show up as http://mydomain.com/blog/

  5. Open the web.config file in IIS. It is an equivalent file of .htaccess in Linux cPanel. You can use FTP to access web.config file or you can directly connect using the RDP.

  6. You can create the web.config file if it doesn't exist and Add the below code inside your web.config file.Save the file if you have connected it through RDP. You need to save and upload this file in case you have used FTP.
     
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="WordPress Rule" stopProcessing="true">
                        <match url=".*" />
                        <conditions>
                            <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>
    
  7. Save the file if you have connected it through RDP. You need to save and upload this file in case you have used FTP.

  8. Access your Wordpress website and now it should show the page which we have discussed in point number (4).

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to move/transfer WordPress website through FTP?

Regardless of the reason, most of people are gone through the stressful experience of moving a...

How to Disable WordPress Pingback to Prevent Pingback Brute Force and DDoS Attacks?

WordPress has become the most popular CMS and it continuously increases its market share. On the...

Comparison between Free WordPress Hosting and Paid WordPress Hosting

AccuWeb Hosting provides free WordPress hosting and fully managed WordPress Hosting plans. There...

How to Enable PHP Error Log for a WordPress website?

Wordpress is widely used open-source CMS and it is coded in PHP and MySQL. Wordpress provides a...

How to configure WordPress to use temporary URL in cPanel?

WordPress is a CMS application that can be installed and accessed through a domain name. As per...