WordPress 3.9 upgrade fails
Asked Answered
S

6

5

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?

Steady answered 23/4, 2014 at 19:44 Comment(0)
L
7

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
Latton answered 3/9, 2014 at 4:9 Comment(0)
P
3

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

Portulaca answered 26/1, 2016 at 13:48 Comment(0)
E
2

The solution I found when I encountered this problem was to add the IUSR group in the security settings of the whole folder of your website. Once you are done with the update, remove it again.

Errolerroll answered 25/11, 2014 at 16:55 Comment(0)
V
1

I had this same issue today. After searching for hours, one site mentioned:

The wp-cron.php file should have 644 file permissions. If the wp-cron.php file permissions are not 644 then change the file permissions to 644.

I made that change, and the automatic upgrade worked.

Visakhapatnam answered 20/7, 2014 at 4:27 Comment(1)
Thank you! I'm on a Windows Server system, and I'm not sure how to relate the 644 file permissions to Windows permissions. I've suspected that this is my problem, but I don't know how to set the permissions for the blog files on a Windows system.Steady
H
1

I added these permissions for IUSR as suggested by @blu, but that by itself was not enough. For me I also had to add IIS_IUSRS with Modify permissions. After updating WordPress I removed the permissions again.

Hackman answered 18/3, 2019 at 17:24 Comment(1)
Adding IUSR solved the issue for me.. I have no idea why since my worker process does not run under IUSR. Anyway, thank-you for the hint.Duston
F
0

Easier to do it through IIS Edit Permissions/Security Tab. Just grant Modify to Users account at the root directory of the website, Press apply, install the Wordpress update (10 seconds), and then change the permissions back.

Formality answered 27/2, 2016 at 2:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.