If you receive the following error when trying to update WordPress, you’ve probably got your file permissions set incorrectly:
1 2 3 4 5 6 7 8 |
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 |
If you have SSH root access to your server, this will likely solve your problem:
1. Navigate to your base WordPress installation folder.
This is folder contains your wp-config.php file and subfolders /wp-admin, /wp-content and /wp-includes.
For example, if your WordPress installation directory is /var/www/html you would type:
1 2 3 |
cd /var/www/html |
2. Change your WordPress file permissions to 664:
1 2 3 |
sudo find . -type f -exec chmod 664 {} + |
3. Change your WordPress folder permissions to 775:
1 2 3 |
sudo find . -type d -exec chmod 775 {} + |
4. Change the permissions of your wp-config.php file to 660:
1 2 3 |
sudo chmod 660 wp-config.php |
5. Try updating WordPress again
It should work now.