I tried to upgrade from 1.7.3 to 2.5 by the manual method. When everything was copied over, I got this when I tried to access:
Fatal error: Cannot redeclare sanitize_url() (previously declared in /home/public/wp-includes/formatting.php:4559) in /home/public/wp-includes/deprecated.php on line 2010
@MoJones You say you upgraded by the “manual method”. Are you sure you uploaded the correct wp-includes folder for version 2.5? Because that function does not exist in deprecated.php in version 2.5.
@Guido07111975 is correct that function was deprecated by WP and then undeprecated. My guess is that you didn’t update the file. Guido is wrong about CP forgetting to undeprecate it. We did undeprecate it!
I think I just deleted the wp-content and wp-config folders from the 2.5 download, then copied all the remaining ones over in one go. However, it is quite possible that I managed somehow to mess things up. I’ll try again next week and let you know how it goes.
OK, I tried again with a fresh dowload of 2.5 and EXACTLY the same thing happened. But I did mess up, perhaps because I pasted from the wrong file in my original post (formatting.php)? Sorry! This is relevant section from functions.php, lines 2007 to 2024:
/**
Retrieves bookmark data based on ID.
@since 2.0.0
@deprecated 2.1.0 Use get_bookmark()
@see get_bookmark()
@param int $bookmark_id ID of link
@param string $output Optional. Type of output. Accepts OBJECT, ARRAY_N, or ARRAY_A.
Default OBJECT.
@param string $filter Optional. How to filter the link for output. Accepts ‘raw’, ‘edit’,
'attribute', 'js', 'db', or 'display'. Default 'raw'.
@return object|array Bookmark object or array, depending on the type specified by $output.
*/
function get_link( $bookmark_id, $output = OBJECT, $filter = ‘raw’ ) {
_deprecated_function( FUNCTION, ‘2.1.0’, ‘get_bookmark()’ );
return get_bookmark($bookmark_id, $output, $filter);
}
Maybe I’m just interpreting the error message incorrectly? This stuff is way above my head.
Fatal error: Cannot redeclare sanitize_url() (previously declared in /home/public/wp-includes/formatting.php:4559) in /home/public/wp-includes/deprecated.php on line 2010
I can’t upgrade with a plugin because my webhost (nearlyfreespeech.net) won’t allow it. I can’t upgrade plugins via the WP backend for the same reason - I have to use CLI. It’s very security conscious.
I think that you could also try asking your hosting provider to do the migration for you. it just consists of taking wp-includes and wp-admin folders from CP, deleting the WP ones and replacing them with the CP ones. you trying to do that on your own on a host that blocks the migration for safety reasons and not being able to upload files properly probably is the issue here if I have understood what you tried to do.
I am convinced they would not deny the support in migrating and being basically the ones having complete access it might be easier for them to do so.
I agree that’s a good idea. Or else use SFTP to delete and re-upload those folders. The problem here is definitely not with CP but with the update process.