In the land of one-click installers, where any web host can get a WordPress site running with little-to-no user interaction, sometimes installing WordPress on a Windows server is an exercise in frustration.
While at it’s base level, you can use the Web Platform Installer to install WordPress but I’ve found that it is rarely that simple. With a lot of our clients, they decide that they want a blog to go with their existing non-WordPress site while keeping it on their main domain. This is understandable. I would probably want the same thing.
But what I’ve had to deal with ends up being a fight between user permissions and application permissions just to get WordPress running. While many may not have this problem, but it comes up frequently for me and for some reason I always forget what I did to resolve all my errors. So this time around, this post is not only meant to share with the world, it’s my own reminder when I have to do it again.
The issue arises when I install WordPress in a sub-folder of a parent website. This is because they usually want whatevertheirdomainis.com/blog to be the URL, and I like keeping things organized so I am ok with this.
I usually come across two different problems, and frequently they will both show up depending on my attempts to fix it.
The first error is an actual IIS error that is thrown in regards to the web.config file not having sufficient permissions. Often this error will appear first, and then after I had what I figured was the correct permissions, I end up with the second problem.
The second one is an infinitely loading page. I could leave it for hours and it will never time out, never throw an error, but just make an attempt to load the page forever.
The most likely resolution is to make sure that your IIS_IUSRS account has read access to the folder where the web.config is located. for the parent site. While this may not seem to resolve the issue, I found that I had to stop and restart the Application Pool in order for it to recognize the changes.
Some people suggested that you actually need to give the Application Pool created by the blog proper permissions, which you can access in the permissions settings by using IIS ApplicationPool\<applicationPoolName> but I haven’t found this to be the actual problem either time I’ve run into this but it is worth noting.
Microsoft also suggests this error can be caused by a malformed applicationHost.config file but this is highly unlikely to be caused by simply installing WordPress. Especially if you have other sites running already.
Just remember not to give the IIS_IUSRS account write access. And being on Windows, the first time you try to install a plugin or update WordPress, it will most likely ask for FTP credentials as well.
It’s amazing how easily you can forget something as simple as giving proper user permissions. Cheers!