Error installing Plugins/Themes – Could not copy file
-
Good morning everyone,
I am performing the installation of a WordPress website and the ISP I use, accepts only update via FTP.
However I can not perform the update. I will explain the scenario, all steps completed, what has changed and what my analysis.
1 Scenario
* I use version 4 of WordPress and need to perform the installation of plugins via FTP (any plugin).
* I have access to the FTP server that has 775 permissions for directories and 664 for files2 Testing conducted
* In the first attempt to update with the default WordPress configuration the following message appears:Unable to locate WordPress Content directory (wp-content).
* So, I performed the modification to manually set the directory: wp-content in the file: wp-config.php
define(‘FS_METHOD’,’ftpext’);
define( ‘FTP_BASE’, ‘/acta/’ );
define( ‘FTP_CONTENT_DIR’, ‘/acta/wp-content/’ );
define( ‘FTP_PLUGIN_DIR ‘, ‘/acta/wp-content/plugins/’ );* After trying to update the plugin again the following message was displayed;
Could not copy file. jetpack/functions.opengraph.php* I tried to find what the directory path he was trying to copy, so I changed the contents of the file: wp-admin / includes / file.php
1 if ( ! $wp_filesystem->put_contents( $to . $info[‘name’], $contents, FS_CHMOD_FILE) )
2 return new WP_Error( ‘copy_failed_ziparchive’, __( ‘Could not copy file.’ ), $info[‘name’] );
3 }I changed line 3 to display the variable $ to
2 return new WP_Error( ‘copy_failed_ziparchive’, __( ‘Could not copy file.’ ), $to );* After another attempt to update the following error was displayed:
Unable to copy the file. /acta/wp-content/upgrade/jetpack.tmp/3 Analysis
* I have no deep knowledge of PHP or WordPress, but I imagine that I have to define 2 differents paths, one to file copy and another to FTP. I also tried to set the absolute path for copying, but still the same message appears:define (‘WP_CONTENT_DIR’, ‘/www/teste.com.br/htdocs/acta/wp-content’);
As quoted, it is just a suspect.
I thank your attention to this case.
The topic ‘Error installing Plugins/Themes – Could not copy file’ is closed to new replies.