Troubleshooting WordPress update failure: The update was not installed because we couldn't copy some files

Sometimes when we upgradeWordPress websiteProgram version, or upgradeWordPress plugin, an error message will appear:

Update failed: The update was not installed because we couldn't copy some files.

  • This is usuallyWordPress websiteThe file permissions of the program are inconsistent.
  • In fact, when WordPress sites are moved, upgraded, and updated, they have encountered similar prompts, almost all caused by insufficient permissions. Such problems are quite common.

For example, errors like WordPress update failed ▼

Troubleshooting WordPress update failure: The update was not installed because we couldn't copy some files

"The upgrade was not installed because we couldn't copy some files. This is usually due to inconsistent file permissions.: wp-includes/js/plupload/handlers.min.js, wp-includes/js/plupload/handlers.js, wp -includes/js/wp-api.js, wp-includes/js/wp-api.min.js, wp-includes/class-wp-customize-manager.php, wp-includes/class-http.php, wp -includes/class-wp-xmlrpc-server.php, wp-includes/version.php, wp-includes/taxonomy.php”

  • Indicates that these files and their files do not have write access to this folder, so the update cannot be upgraded.

recent,Chen WeiliangBlogs have inconsistent file permissions when updating WordPress plugins.

The error message appears due to insufficient WordPress permissions:"Update failed: The upgrade was not installed because we could not copy some files."

  • At this time, please check the plugin, the owner and all groups are root users, and there is no permission to write in the file.
  • The solution is to use the chown command to modify the permissions.

SSH set 775 permissions

If you are using a VPS, these directories The default owner is root,The FTP used is vsftpd,The server is Apache2.

These conditions mainly restrict the default user group names.

如果LinuxDepending on the installed system, the user group names may need to be adjusted.

The following is the SSH setting 775 permission process ▼

Step 1:login SSH

Step 2:Go to the /wp-content/ directory ▼

cd /home/你的用户名/web/你的域名文件夹/public_html/wp-content/

Step 3: Set 755 permissions to these directories, that is, only the owner has permission to write ▼

chmod -R 755 plugins/
chmod -R 755 themes/
chmod -R 755 uploads/
chmod -R 755 upgrade/

VestaCPChange folder permissions

If youInstall the VestaCP panel, to quickly modify the permissions of the WordPress website directory, you can use the following commands ▼

chown -R admin:admin /home/admin/web/你的域名文件夹/public_html/*

HestiaCPChange folder permissions

HestiaCP quickly modifies the permissions of the WordPress website directory

chown -R 你的用户名:你的用户名 /home/你的用户名/web/你的域名文件夹/public_html/*

CWP Control PanelSet 755 permissions

If your VPS is installed with the CWP control panel, please log in directly to the background of the CWP control panel to set permissions.

Step 1:Go to Fix Permissions page

  • CWP menu –> User Accounts –> Fix Permissions (fix permissions and select user)

Step 2:Choose your user ▼

Repair permissions and select users in CWP Control Panel.

Step 3:Click Fix Account Permissions ▲

  • CWP control panel setting 755 permissions is really simple and fast ^_^

Virtual host setting permissions

If you are using a virtual host, not a VPS, then the above setting method does not apply.

Please add the following code to the wp-config.php file in the root directory of your WordPress website ▼

define("FS_METHOD","direct");
define("FS_CHMOD_DIR", 0755);
define("FS_CHMOD_FILE", 0755);

Basically doing this will make your WordPress program both more secure and able to upgrade.

In order to do wellInternet marketingtasks, you can now start testing installations and upgrades, variousWeb PromotionPlugin ^_^

Comment

Your email address will not be published. Required fields * Callout

Scroll to Top