Are you just stuck at updating your WordPress website and you keep getting an error message that displays “Could not copy file”?
If so, you are not alone and neither it is even hard to fix!
I myself have encountered this WordPress update issue for a few times now already and it happens due to permission error of the site’s files and directories. Keep reading and I will show you how to fix it within a minute!
How to fix WordPress Could Not Copy File Installation Failed?
The WordPress could not copy file installation failed error may look similar to this below:
Downloading update from https://downloads.wordpress.org/release/wordpress-5.8-no-content.zip… The authenticity of wordpress-5.8-no-content.zip could not be verified as no signature was found. Unpacking the update… Verifying the unpacked files… Preparing to install the latest version… Enabling Maintenance mode… Copying the required files… Disabling Maintenance mode… Could not copy file.: wp-includes/Requests/Exception/HTTP/502.php Installation failed.
We can see that the above message is indicating a file which was not copied and it’s due to permission error which we can solve from cPanel file manager.
All we have to do is locate the file the WordPress is unable to copy while updating the site and make change in permissions.
Here’s how to do it:
Navigate to the directory, in my case it is: wp-includes/Requests/Exception/HTTP/502.php
You can see it’s showing the directory is empty but it is not. The files are there and they are hidden due to permission error. To make it appear there, just go back by clicking on “Up One Level” text in the navbar. Then you will see something similar to this:
In my case, the culprit directory is HTTP. So I just have to select it and change permission to 755 which you can see in the screenshot below:
Next just click on “Change Permissions” and enter the directory again. Now you will see all the files there. And if any of the files are showing in grey color then change their permission to 755 as well.
After that, just head over to your website’s update page and try to update WordPress again. This time it should be working and/or if you get similar error again(which can happen sometimes) for any other files, follow the same steps for those files too. Once completed, the update should work out pretty well.
As I said the Could Not Copy File error appears due to permission error in the directory or files. If you would follow the steps above it should be fixed and if it’s not fixed then comment below or hire me to fix your WordPress errors.