Using WordPress on IIS7

I’ve been running WordPress 2.7 for a few weeks now and I have been very happy with it so far. In this post I’ll share my thought process behind running WordPress on IIS7 and the details on how I have it setup.

I setup my first blog back in 2006 running on dasBlog. I was never really happy with it, mostly because I couldn’t find a theme I liked. I wrote a few posts, then when I changed hosting providers, I never setup the permissions correctly and was unable to post. It would have been an easy fix, but it became an excuse to not blog.

When I decided to start blogging again, I wanted something that would be easy to setup, and wouldn’t take a lot of effort to maintain. Since I’m a fan of Google’s offerings, I started off using Blogger. Unfortunately, I ran into some DNS limitations and couldn’t get things setup the way I wanted. I also checked out the hosted WordPress solution, but it was even more limited then Blogger.

I decided to use WordPress as my blogging platform because there is a very active community, lots of themes available, and because you there are plugins that allow you to add whatever features you want without any coding.

Since IIS7 has decent PHP support, I decided to use a Windows plan on GoDaddy.com. This will allow me to put .NET apps on my site down the road. I also have another site that I need to host that requires .NET and this keeps my hosting costs lower.

Installing WordPress 2.7 was pretty easy. I just had to create a MySQL database, upload the WordPress files and run through the setup.

Next, I had to get pretty permalinks working the way I wanted them. One way to do this would be to use Microsoft’s URL Rewrite Module. The problem is that GoDaddy doesn’t currently support the URL Rewrite Module (I’ve heard that they plan to support it soon). I ended up using the ManagedFusion Url Rewriter.

Create a file named “ManagedFusion.Rewriter.rules” in the root folder of your blog. This will allow you to use .htaccess syntax to handle the Url Rewrites. I set mine up to remove the www from my hostname, remove index.php from the url, and redirect urls from my old blog to the new location.

Plugins I’m using

The main reason I’m using DISQUS is because comment notification emails weren’t working for me with the default WordPress comments. It does add some nice functionality though, including threaded comments, comment spam protection, facebook connect integration and more. The other thing I liked about DISQUS is that all of my comments are synced in the WordPress database so if I ever want to stop using DISQUS, all I need to do is disable it.

Hi, When you used managedfusion on godaddy, how did you manage to get around the trust level issue? Right now they issue only a medium level and I'm guessing managedfusion requires full. I haven't been able to get it to work on godaddy so far. Any ideas?

@Ramesh – I am working on getting the latest version of ManagedFusion URLRewriter working on a shared GoDaddy IIS7 account. From what I can tell, the only time you run into an issue with trust level is if you attempt to turn RewriteLog. I tried to do this and got a code access security exception, though my stack trace was different than what you have and if I recall, the issue was with TraceListener — this after I ensured the directory was writable, etc.

I tried the exact same steps you mentioned. But it didnt work for me. I get the following error :
500 – Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
Hosting : Godaddy with Delux Windows hositng with IIs7.
– Web Config —

Let me know, if there is any error in web.config file. I have place the dlls in bin folder too.

I got the posts to work after tweaking the wordpress program. But I am not able to do postback to any of the wp-admin pages. I did put the below code in my .rules file. Any idea why it is not able to do postbacks?

same here I’m getting a 500 error. my wordpress site is also in a sub directory on my hosting account, but the domain points to that sub directory as it’s root. does the web.config and bin go in my wordpress sub dir or in my hosting root directory?

to have godaddy work, you need to add the bin directory on the IIS Settings from the godaddy admin. Just add the directory and wait a couple of minutes , then just copy the dll and pdb file manually.
BUT i get a new error:
The virtual path ‘/index.php/ ….. .bla bla/’ maps to another application, which is not allowed
so it looks like .net security getting in the way, i’ve seen other posts with the same problem,
any solutions to this ?

hey guys, i am having the godaddy 500 error as well. Not sure what I am doing wrong here. I have http://www.maindomain.com/blog as the location. I dropped web.config, bin folder with files and rules file into the blog folder. also set permissions on blog folder in godaddy interface to read and write and also setup bin folder in iis. Not sure what else to do here.

Hi all,
I, too, am struggling with the 500 error on GoDaddy. Not using rewriting, just trying to get wordpress working. I started a support ticket with them, and they told me (after a week) that it was a problem with my web.config. No other details, of course, since it is “third party software” and they don’t support it. However, when I rename my web.config, the 500 disappears entirely and my admin pages work great. Trouble is, I need it, kinda, for the rest of my site, which is .NET. Any idea what wordpress might be looking for in there?

Hi. I’m setting up expression engine on GoDaddy windows economy hosting (the $4.99 option; turns out it support URL Rewrite now), and I am trying to remove index.php and index.php/site from the url. After much trial and error (and many many 500 errors) I have it working for a single url as such:

As you can see, the site is in a staging folder, so I’m crossing my fingers that this solution will work by removing ./staging’ when I relocate to root, but I would also like to expand it to rewrite index.php? out of the url always (not just for /blog), but every attempt has resulted in 500 errors (many many many…). Expression Engine is installed into the staging folder, blog is just a template I have. So would anyone in the know please help me rewrite this rewrite to work globally?

Found a solution on the EE forums that I thought didn’t work, but then realized it was because of my ‘staging’ subfolder (you would want to replace this or remove it, depending on your setup). Hope this helps anyone with a wordpress or ExpressionEngine installation on windows hosting on godaddy:

No need to install any ISAPI filter to remove the index.php from WordPress permalinks.No need of .htaccess file..Use these simple steps to WordPress Permalinks in IIS 6.0 using Custom 404 Redirect for Windows Shared hosting/manas hosting or any windows shared hosting.

Hi Rob
Nice article/post on WordPress & IIS.
I see it is quite old though (back in 2009 I think I was using XAMPP on WinXP as my localhostserver but now I use IIS on Win7).

I have a problem running WP on my localhost IIS setup that I cannot auto-update the site to the latest WordPress version. I wonder if it is a problem with the web.config file but I do not know how to fix it! Any idea?
Thanks & best wishes