Before we go to the possible solutions, here is a brief about recommended default permissions for files and folders for any website, WordPress or otherwise.
- 755 for all folders and sub-folders.
- 644 for all files.
- r if reading is permitted, – if it is not.
- w if writing is permitted, – if it is not.
- x if execution is permitted, – if it is not.
In numeric notation, file permission may be shown as 755, which means,
OWNER has permission 7 or 111 (in binary) or rwx
GROUP has permission 5 or 101 (in binary or r-x
OTHERS has permission 5 or 101 (in binary or r-x
So symbolically 755 means rwxr-xr-x
where the first there letters denote the permission for OWNER, the middle three letter denotes the permission for GROUP and the last three letters denote permissions for OTHERS.
Similarly, 644 means 110100100 or rw-r–r–
OWNER has permission rw-
GROUP has permission r–
OTHERS has permission r–
In web host file manager, you may have a web interface from where you can change file permission such as in the image given below:
Solution 1. Chmod the upgrade directory to 777
One of the solutions recommended for the “Update Failed: Plugin update failed” is to change the permission of the upgrade directory to 777.
Where is the Upgrade directory in WordPress?
It’s at wp-content/upgrade
After you change the permission to 777 and updated the plugin, make sure to change the permission back to 644.
Solution 2. Delete upgrade directory and recreate it.
The solution to change the permission of the ‘Upgrade’ directory did not work in my case. So I turned to the next solution – apparently. And that is to delete the ‘upgrade’ directory and then recreate it.
So again, we can delete the ‘upgrade’ directory from the web based file manager provided by the host or via FTP client. Simply delete the ‘upgrade’ directory and recreate it. Make sure the permission is 644 after you create the directory.
Go back to the WordPress dashboard and try to update the plugin again.
Well, this worked in my case. And I did not bother to dig further why and how.
Other solutions that others reported to have worked for “Update Failed: Plugin update failed” in WordPress are:
Disabling Ask Apache Password Protect Plugin
I did not have this plugin so I could try this. But if you have ‘Ask Apache Password Protect’ plugin installed, try disabling this plugin and try the other plugin update.
No hard disk space left?
Unless you are on a very tight hosting plan, the chances of hard disk space running out is rare. Or if due to some reason, a lot of big files got generated and you have not done any maintenance, then chances are that you may be running out of disk space.
If you receive any of the error messages:
- Could not remove the old plugin
- Plugin upgrade Failed or Unpacking the update
- Could not copy file /public_html/wp-content/xxxx
Then, you might want to have a look at your web hard disk space. If it is so, do some maintenance, clear some backups you don’t need, clear some space and then try the plugin update again.
These are a few solutions I have encountered and a solution I tried from among the solutions. Let me know which one worked for you or if you have other solutions to resolve this issue – “Update Failed: Plugin update failed“.