1

I have a problem - when I click on "Wordpress update", I receive this message:

Downloading update from https://downloads.wordpress.org/release/wordpress-5.1-new-bundled.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

I changed permissions: WP-admin and WP-includes to 755 WP-content to 777 All files in WP-admin are 755.

What can be the problem? I am trying to solve it, but I can't do it.

  • The permissions need to be set for wp-content and wp-content/upgrade for the zip download and unpack. WordPress should then also be able to write to all WordPress core files in web root, wp-admin and wp-includes. Permissions need to be set for both files and folders. – MikeNGarrett Mar 1 '19 at 14:39
  • It can sometimes also have to do with who "owns" the files. This may give you some ideas: stackoverflow.com/questions/18352682/… – WebElaine Mar 1 '19 at 14:40
0

Try to run these commands (Commands are for both Dashboard and ftp)

sudo usermod -aG www-data $USER

sudo chown -R www-data:www-data /var/www

sudo chmod -R 774 /var/www
| improve this answer | |
0

Make sure that your server is running as the user who owns the folder

| improve this answer | |
0

User SSH, cd into your website root directory, and run:

sudo chmod 2775 . && sudo chown -R ec2-user:apache . && sudo find . -type d -exec chmod g=rwxs "{}" \; && sudo find . -type f -exec chmod g=rw  "{}" \; && sudo setfacl -d -m g::rwx . && sudo setfacl -d -m o::rx .

Make sure to change ec2-user:apache to your user:group.

This will make all directories and sub-directories and any new files copied to them have the same permissions.

| improve this answer | |
0

I had the same problem. I used following command on Centos8:

sudo setenforce 0

After that I could upgrade Wordpress.

| improve this answer | |

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.