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?
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With