Article directory
When maintaining a WordPress site in the HestiaCP environment , you may encounter the error message "Update cannot be performed because some files cannot be copied".
This warning may look alarming, but it's actually one of the most common WordPress permission-related issues.
It typically occurs during automatic upgrades of plugins, themes, or the WordPress core.
On the surface, it's just a "failed update," but the root cause almost always points to the same thing: inconsistent file permissions.
The good news is that once you understand HestiaCP's user model, you can completely solve the problem with just a few commands.
Root cause of the problem: Why does the permission mismatch occur?
In the HestiaCP environment, each website (Vhost) runs under a separate system user.
Meanwhile, the web service processes (PHP-FPM / Nginx) are also executed under the system user account corresponding to the website.
Therefore, when the owner of some plugins or theme files becomes root or another user, website users will not have the right to modify or delete these files.
During the upgrade, WordPress needs to copy and overwrite these files. If the permissions are incorrect, the upgrade will be interrupted and the above prompt will be displayed.
The core reason can be summarized in one sentence: the file owner is no longer a user of the website's system.
Solution: Repair file permissions in the SSH terminal.
Below are the verified repair steps; simply execute the commands sequentially in the SSH terminal.
Please replace your_user in the example with your HestiaCP username, and yourdomain.com with your actual domain name.
The entire process does not require restarting the service and will not affect the site's existing data.
The whole process takes about two minutes, and even beginners can run it successfully on their first try by simply copying and pasting.
Before proceeding, it is recommended to confirm that the terminal can be logged in as an administrator to avoid disconnection during the process.
Step 1: Define variables
First, set two variables, username and domain name, in the terminal so that subsequent commands can be reused directly.
# 设置你的 Hestia 用户名和域名
HESTIA_USER="your_user"
HESTIA_DOMAIN="yourdomain.com"Once the variables are defined, all subsequent commands can directly reference them, avoiding the need for manual input each time.
Step 2: Restore file ownership (core repair)
Force the system owner and user group of all files in the website directory to be returned to the corresponding HestiaCP user.
chown -R $HESTIA_USER:$HESTIA_USER /home/$HESTIA_USER/web/$HESTIA_DOMAIN/public_htmlThis step is the core of the entire repair process; once the ownership issue is resolved, the problem is solved.

If chown reports that the path does not exist, please first check if the variable spelling matches the actual directory.
Step 3: Reset HestiaCP standard file and directory permissions
Next, set the directory permissions to 755 and the file permissions to 644.
# 修复所有目录权限为 755
find /home/$HESTIA_USER/web/$HESTIA_DOMAIN/public_html -type d -exec chmod 755 {} \;
# 修复所有文件权限为 644
find /home/$HESTIA_USER/web/$HESTIA_DOMAIN/public_html -type f -exec chmod 644 {} \;These two sets of permissions are standard configurations for HestiaCP, which can simultaneously satisfy both security and writability.
One-click script (recommended)
If you wish to complete all the above operations at once, you can use the following one-click script.
Simply replace your_user and chenweiliang.com with your actual values, paste the entire paragraph into the terminal, and press Enter.
USER="your_user" DOMAIN="chenweiliang.com" && chown -R $USER:$USER /home/$USER/web/$DOMAIN/public_html && find /home/$USER/web/$DOMAIN/public_html -type d -exec chmod 755 {} \; && find /home/$USER/web/$DOMAIN/public_html -type f -exec chmod 644 {} \;Additional tips: To make the repair more thorough
Fixing permissions only addresses the immediate cause of the "update stuck" issue. To completely resolve this problem, there are two other things worth doing.
First, clean up the residual files left by the interrupted upgrade; second, learn how to perform background repairs without relying on SSH.
These two steps are not difficult, but they can significantly reduce the probability of similar problems recurring.
The following operations are all based on the premise that the permissions have just been restored. Performing them in order will yield the best results.
If you have more than one site on your server, you can also organize this process into a script template for repeated use.
Remove temporary upgrade remnants
After restoring permissions, it is recommended to clean up any temporary files left behind when the WordPress upgrade was interrupted.
These residual files are located in the wp-content/upgrade directory. Failure to remove them may cause the next upgrade to stall again.
rm -rf /home/$USER/web/$DOMAIN/public_html/wp-content/upgrade/*Don't want to use SSH? Manually fix it in the HestiaCP backend.
If you find it inconvenient to use the command line, you can also log in to the HestiaCP backend and reset permissions through the file manager.
Go to Files (file manager) and navigate to /home/USER/web/DOMAIN/public_html/wp-content.
Right-click the plugins or themes folder and select Reset Permissions.
After resetting permissions, go back to the WordPress admin panel and click update again; it should usually work smoothly.
If the same error persists after performing the backend operation, simply return to the SSH solution above and verify ownership again.
Final Thoughts
If you encounter the message "Update cannot be performed because some files cannot be copied," do not rush to reinstall. In most cases, it is a permissions issue.
By using a single `chown` command and two `find` commands to return ownership and permissions, WordPress updates can be completed smoothly.
Developing the habit of checking file ownership before upgrading can fundamentally prevent these kinds of errors from recurring.
Hopefully, the article "Solving the WORDPRESS prompt: Update cannot proceed because some files cannot be copied. This problem is usually caused by inconsistent file permissions," shared on Chen Weiliang's blog ( https://www.chenweiliang.com/ ), will be helpful to you.
Feel free to share this article's link: https://www.chenweiliang.com/cwl-34583.html
