WordPress Updating Under Windows & IIS

Posted in WordPress on April 9th, 2014 by Richard – Comments Off on WordPress Updating Under Windows & IIS

The Common Error

…would be something like:

Warning: copy(some local path/wp-admin/includes/update-core.php) [function.copy]:
failed to open stream: Permission denied in 
the same local path\wp-admin\includes\class-wp-filesystem-direct.php on line 131

But all the information boiled down to a reiteration of the information from http://codex.wordpress.org which says on Updating WordPress:

(a) file ownership: all of your WordPress files must be owned by the user under which your web server executes.


(b) file permissions: all of your WordPress files must be either owner writable by, or group writable by, the user under which your Apache server executes.

Of course that "under which your Apache server executes" is the give-away. Under a different web server things are likely to be different.

Permissions on IIS 7 & 7.5

Typically this means running WordPress under PHP using fast-cgi with the Application Pool (AppPool) running under “Application Pool Identity”.

But because of the way the AppPool identities are implemented, just giving that identity write and delete permissions on the WordPress folder (and all of its contents, recursively) is not enough. (To assign permissions to an AppPool identity on Windows Server 2008 R2 (and later) use the name IIS APPPOOL\name (which is a local account), on Server 2008 you need to use the command line).

You also need to give the local account IUSR the same permissions.

And suddenly updates start working. Of course to completely test this I need a new update to the WordPress code... but 3.9 will hopefully be along shortly.

One final note: this blog runs on Apache, but I run a local test instance on Windows for testing. And, eventually, my own theme (because I've yet to find anything that really suits me :-) ).

Updated: WordPress 3.8.3

Helpfully a new WordPress has jjust been released, thus able to test this with more than a theme or plugin update. And it just worked: updated from 3.8.2 to 3.8.3 without problem.