Setting up WordPress permalinks on IIS 8

      2 Comments on Setting up WordPress permalinks on IIS 8

Setting up WordPress permalinks on IIS 8 is pretty straightforward. If you know what you’re doing of course. In this post I’ll show you how to set this up using the rewrite module on IIS. For those that don’t want to know how this works, but just want the end-result: at the end of the post you’ll find a working web.config file that should serve your needs.

The way WordPress handles permalinks is actually quite simple. All requests are to be routed through WordPress (index.php) and WordPress will take care of the rest for you. There is one exception though: existing files and folders should not be treated this way. We can use conditions to restrict the rewriting to suit our needs.




Besides that we can just send all requests through index.php for processing. We do this like this:



This simple rewrite is sufficient for WordPress to do its thing. Is that all? Yes it is. For those of you that are just looking for the code to fix this:
TL;DR



  
    
      
        
          
          
            
            
          
          
        
      
    
  

2 thoughts on “Setting up WordPress permalinks on IIS 8

  1. Justin

    This is the first thing that worked for me, however the only issue is now my homepage needs to have “/index.php” to work…

    Reply
    1. WiZZarD Post author

      Do you know how PHP is set up for you? Is it running as a FastCGI process? That could cause this behavior.

      Reply

Leave a Reply

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