aposai
Forum Replies Created
-
Ups, sorry @esmi, my mistake. I didn’t realize it was the plugin forum, just googling for the same error and found this thread, so after found a solution by myself I posted here to help other users.
Hi @jdminv, I don’t have WP Better Security plugin installed, so it should be from the WordPress itself.
Forum: Fixing WordPress
In reply to: Failing to update to 3.8.1Sorry, I meant to remove the /home/myuser from the destination path (not the source)
And also apology for my english.
Hi,
I’ve been debugging this problem a bit and found a solution. However I have other wordpress in the same hosting that updates without errors…
First step is get more information about the problem, so I modified line 1376 of file wp-admin/includes/class-wp-upgrader.php
from:
return new WP_Error( 'copy_failed_for_update_core_file', __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), 'wp-admin/includes/update-core.php' );
to
return new WP_Error( 'copy_failed_for_update_core_file', __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), $working_dir . '/wordpress/wp-admin/includes/update-core.php --' . $wp_dir . 'wp-admin/includes/update-core.php' );And run the upgrade core again to see what is trying to copy. In my case it outputs:
/www/wp-content/upgrade/wordpress-3.tmp/wordpress/wp-admin/includes/update-core.php –/home/myuser/www/wp-admin/includes/update-core.phpAs you can see one path starts with /home/myuser/www and other starts with /www
I don’t know why or where wordpress obtains different paths here…
Next step is remove /home/myuser from the source path, so I added this code after line 1341:
$wp_dir = trailingslashit($wp_filesystem->abspath()); $wp_dir = str_replace('/home/myuser', '', $wp_dir); //new codeAfter this change I could upgrade to 3.8.1 without any problems 😉