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


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

  • 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, 2019 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, 2019 at 20:07

2 Answers 2


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. May 12, 2019 at 13:39
  • right :). I think I should remove that code then. May 13, 2019 at 15:23

You might need to switch SELinux into Permissive mode:

sudo setenforce 0

You will most likely want to set the mode back when you are done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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