You know that keeping your WordPress site updated is crucial for website security. But what happens when you try to update a WordPress plugin but the update failed?
In today's tutorial, you will learn how to solve WordPress plugin failed to update.
This rarely happens but if the site permission isn't setup correctly, you will not be able to update the WordPress plugin or theme.
The default permission should be as follow:
The key concept is that when it comes to file permissions, there are three classes of users involved - Owner, Group and Others. We won't get into the details of this and you may look upon the internet to read more about it. There are three main permissions involved - read, write and execute. They are symbolically denoted by the letters:
In numeric notation, file permission may be shown as 755, which means":
So symbolically 755 means rwxr-xr-x, where the first three 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--
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:
One ofthe method to fix the Update Failed: Plugin update failed is by updating your WP directory to 777.
This directory is found here: /wp-content/upgrade
In order to access this directory, you would need to login to your hosting panel and do a quick search for the folder.
We use FTP most of the time, but if you want, you can also use the file manager in your cPanel hosting to change the permission from the default 644 to 777.
After updating the permission, try to update your plugin once more. Now, it should work just fine.
Remember that you must change the permission level back to 644 after updating the plugin (for security reasons).
You should consider this solution if the first solution doesn't work. This solution is rather straight forward—delete the directory and recreate the directory again.
Important: Create a backup prior to deleting any files from your WP database for safety reasons.
Using an FTP client such as FileZilla, simply delete the 'upgrade' directory and recreate it. Make sure the permission is 644 after you create the directory.
Once that is done, head over to your WordPress dashboard and try to update the plugin again.
If this solution works, it is probably the directory is somehow corrupted. Re-creating a new directory solved the issue once and for all.
If you have 'Ask Apache Password Protect' plugin installed, try disabling this plugin and try the other plugin update. This plugin is known to create issues when it comes to updating WordPress plugins.
We rarely see this as a problem since running out of hard disk space is super rare. Here are some hints that your hard disk space is limited or full:
If you are getting any of the above error messages, it is time to do some website maintenance, including clearing old backups you no longer need. Clearing unwanted files from your database will free up the disk space.
Do you experience any of the above? Let us know which one worked for you or if you have other solutions to resolve this issue - "Update Failed: Plugin update failed" in the comments below!