WordPress on IIS7 can’t install themes or plugins automatically

WordPress has an awesome feature where it can automatically upgrade itself, install themes and plugins, etc. It works fantastically on all apache and lamp installations I’ve played with, but never on Windows with IIS.

I recently upgraded to IIS7 and it was still giving me errors when trying to upgrade, install plugins, etc.

I realized that it just didn’t have write access to the file system so it couldn’t download the new files. To fix this, I added the user IIS_WPG to my wp-content directory with write permissions and immediately it worked. The full step by step went:

1. In file explorer, right click on the wp-content directory. Select Properties.

2. Select the Security Tab.

3. Click Edit.

4. Click Add

5. Type IIS_WPG, click Check Names. It should format it.

6. Uncheck Execute, check, Write and Read.

7. Click Apply.

You’re done!

It should work now.

Update for WordPress Permalinks on IIS

There has been quite a bit of comments going back and forth on the code that I wrote to enable permalinks for WordPress on IIS since I put it up on the site. Just recently, Einar Egilsson posted an extremely helpful bit a code in the comments. It’s a much better and cleaner way of accomplishing the same thing.

I was always aware that my solution was a little odd in that it used ASP. WordPress is written in PHP and to use ASP requires odd work-arounds. Einar gave us a great simple solution that uses PHP. It too requires 404 redirects, though.

It’s requirements are:

  • IIS for Windows
  • WordPress
  • Ability to change your 404 error page with your web host.

To install, copy and paste this text into a file named wp-404-handler.php:

< ?php $qs = $_SERVER['QUERY_STRING']; $_SERVER['REQUEST_URI'] = substr($qs, strpos($qs, ':80')+3); $_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI']; include('index.php'); ?> 

Next set the 404 error page to /wp-404-handler.php. If it gives you a choice between file and url, choose url.

Lastly, make sure you enable permalinks in the WordPress control panel under Options > Permalinks.

That should do it.

Thanks to Einar for posting this in the comments and thanks to CaptainN who first wrote about in the WordPress support forums.