Question

Can't update to 3.9, problems with rights (One click install)

  • Posted April 27, 2014

Wordpress was installed with the 1 click install with CentOS

In wp-admin: Downloading update from https://downloads.wordpress.org/release/wordpress-3.9.zip…

Unpacking the update…

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

In my apache2 error.log: PHP Warning: copy(/home/wordpress/public_html/wp-admin/includes/update-core.php): failed to open stream: Permission denied in /home/wordpress/public_html/wp-admin/includes/class-wp-filesystem-direct.php on line 217

Anyone knows what to do?

Thanks

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I got the Inconsistent file error as well, this post came up for me trying to fix the issue in May 2016, so I though this might help someone else. I had to follow this:

http://aaronjholbrook.com/wordpress-permissions-update-error-resolved/

More specifically, I had to reset the group for wordpress:

chgrp -R wordpress /path/to/site/

But first, so I wouldn’t actually change anything, and just reset the group - I queried the current group of the files with

stat /path/to/file

Hmm, somewhat annoying as it seems to have broken plugin installation/uninstallation, but that’s not a huge problem, I can just do what you suggested when I need it. I’ll look into it

It worked! Thanks <br> <br>However the problem with -R is that it touched the files also, which should be set to 644 for best security I believe. <br> <br>Here’s a script I found that will fix that <br>https://gist.github.com/francisbyrne/3731497 <br> <br>It doesn’t let you set what permissions, but if you specific a folder, then choose for folders, it will change only the folders to 755 (as they should) and if you specify only the files, it will change only the files to 644 (as they should) <br> <br>Quite handy

Ok, what you’ll need to do is login to your server with ssh and use these commands: <br> <br>cd /home/wordpress <br>chmod -R 755 public_html <br> <br>Then try updating wordpress again if that doesn’t work use the commands again but with the permission 777 after you update wordpress set the permissions back to 755. Hope this helps!