1

I am using CentOS 7 (CentOS Linux release 7.6.1810 (Core)), NGINX 1.15.12, WordPress 5.1

Error

Update WordPress
Downloading update from https://downloads.wordpress.org/release/wordpress-5.2-no-content.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

My screenshoots

enter image description here

enter image description here

enter image description here

  • But what did you do then? Have you checked file and folder permissions and ownership as the error message suggests? Please update your question with your findings regarding file and folder permissions and ownership. Many thanks – leymannx May 11 at 12:37
  • I'm getting the same thing. I've set all the files to uid:gid of www-data:www-data (which is the user and group apache is running as) and set all the files permissions to 664 and directories permissions to 775 (i also tried 644 and 755, and just to see if it would work, I tried 777 for both) and I still get the same error. – gymbrall May 14 at 20:07
0

All directories should be 755 or 750. All files should be 644 or 640. Exception: wp-config.php should be 440 or 400 to prevent other users on the server from reading it. No directories should ever be given 777, even upload directories. Since the PHP process is running as the owner of the files, it gets the owners permissions and can write to even a 755 directory.

Run the following commands in your root folder and try to update your WordPress again.

find . -type d -exec chmod 755 {} \;  
find . -type f -exec chmod 644 {} \;  
  • As per @leymannx's comments, you cannot assume www-data for the user and group as the OP may have something else. – Alexander Holsgrove May 12 at 13:39
  • right :). I think I should remove that code then. – Arvind Singh May 13 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.