Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WordPress 3.9 upgrade fails

When I try to upgrade a WordPress 3.8.1 site to 3.9, I get the following error:

The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php

Installation Failed

I've checked all the folders and files in the site, and they all the same permissions.

WordPress is running on Windows Server 2008 R2.

Must I go through the manual upgrade process, or is they a way to tell why I'm getting this error message?

like image 396
Dan-BTP Avatar asked Apr 23 '14 19:04

Dan-BTP


2 Answers

The only way I've found to make this work is to give your IIS user the Modify permission on the wp-admin folder and the WordPress files in the root. That user will be ApplicationPoolIdentity, IIS_IUSR, or something else depending on your IIS version.

Obviously, this is a security risk. So I manually add those permissions when I need to upgrade and then remove it again when the upgrade is done.

Here are the commands I use to automatically add the permissions:

icacls [your path]\*.php /grant BUILTIN\IIS_IUSRS:M
icacls [your path]\license.txt /grant BUILTIN\IIS_IUSRS:M
icacls [your path]\readme.html /grant BUILTIN\IIS_IUSRS:M
icacls [your path]\wp-admin /grant BUILTIN\IIS_IUSRS:M

And to remove them:

icacls [your path]\*.php /remove BUILTIN\IIS_IUSRS
icacls [your path]\license.txt /remove BUILTIN\IIS_IUSRS
icacls [your path]\readme.html /remove BUILTIN\IIS_IUSRS
icacls [your path]\wp-admin /remove BUILTIN\IIS_IUSRS
like image 130
Josh Yeager Avatar answered Sep 25 '22 03:09

Josh Yeager


I found this question while searching for solution to same problem with update to WordPress 4.4.1 on Windows 2012 R2. Josh's answer helped me find solution for my problem.

Here is what I used to add the permissions:

icacls [WordPress path] /grant IUSR:(OI)(CI)(M)

And to remove:

icacls [WordPress path] /remove IUSR

like image 38
Davor Avatar answered Sep 25 '22 03:09

Davor