• Resolved PressGang

    (@pressgang)


    I am getting the same error when I try to update two very different 4.8.3 sites to 4.9 …

    ‘Fatal error: Cannot redeclare get_shortcut_link() (previously declared in /home/mysite/XXXXXXX/htdocs/wp-includes/link-template.php:2906) in /home/mysite/XXXXXXX/htdocs/wp-includes/deprecated.php on line 3912’

    The update appears to be going well until about 30 seconds after the message ‘Copying the required files…’ appears, then it just freezes.

    As I understand it that error relates to the WP tool ‘Press This’. This is the code preceding line 3912…

    function get_shortcut_link() {
    	_deprecated_function( __FUNCTION__, '4.9.0' );
    	$link = '';
    	/**
    	 * Filters the Press This bookmarklet link.
    	 *
    	 * @since 2.6.0
    	 * @deprecated 4.9.0
    	 *
    	 * @param string $link The Press This bookmarklet link.
    	 */
    	return apply_filters( 'shortcut_link', $link );
    }

    I have never installed a plugin called ‘Press This’, so as this doesn’t appear to be a either a theme or plugin related issue should I assume this is a core problem and therefore refrain from updating tens of other sites?

Viewing 2 replies - 16 through 17 (of 17 total)
  • Thread Starter PressGang

    (@pressgang)

    Thanks @williampatton,

    I should have mentioned ownership and yes I can see that in FileZilla. I’m using shared servers so the owner varies accordingly but within each site the ownership is consistent.

    My hosts are excellent and automatically create backups every night and keep them for two weeks, any can be restored on request. I also use UpdraftPlus and have remote copies of each site. For added convenience I also make FTP backups when necessary. I’m awash with backups!

    I’m a reseller and I use a one-click installer to install each instance of WP so I could install to a separate directory within each site and simply move that installation (minus config.php) to the root after deleting the live version. I hadn’t thought of that, thank you!

    Thread Starter PressGang

    (@pressgang)

    I think this problem is solved.

    I’ve attempted several WP 4.9 updates now, using a range of methods, and I feel more confident about dealing with the failures now.

    I’ve discovered that the WordFence security plugin seems to be implicated in the failures, regardless of the fact that the one-click update is supposed to temporarily deactivate all plugins.

    If I manually deactivate that plugin the one-click update has worked every time.

    I’ve also done several successful manual updates by pre-uploading the contents of the unzipped ‘wordpress-4.9-no-content’ folder to a separate directory (eg. wp-update), and then after deleting the core files (wp-admin, wp-includes and wp files in the root), simply dragging the updated folders and files into the root directory. That way the whole manual update process takes about one minute of downtime.

    Thank you to all who helped.

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Update to 4.9 ~ Fatal error: Cannot redeclare get_shortcut_link()’ is closed to new replies.