Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Update to 4.9 ~ Fatal error: Cannot redeclare get_shortcut_link()

Discussion in 'Misc WordPress Requests' started by williampatton, Nov 18, 2017.

  1. williampatton


    Reply To: Update to 4.9 ~ Fatal error: Cannot redeclare get_shortcut_link(), by williampatton

    Hey @pressgang,

    Updates can fail for a large number of different reasons and it is often hard to diagnose the failure due to specific configurations present on each server running the update.

    Most commonly I see issues with file permissions causing this. Usually a user mismatch caused by the server user being different to the FTP user and both not being present in each other’s usergroup (generally meaning 1 of the users – usually the server user – is unable to update or overwrite files owned by the FTP user). That is a common issue I see when WordPress has been installed by a hosting providers 1-click option in their hosting panel.

    If permissions is not the problem here I seen some other things trigger a fail on update for me in the past. An IO hang – if the server the site is on has a moment where it is either overloaded or your system needs to wait a long time for a different system’s IO to complete on the hard disk then the PHP process may time out and be killed by the server (very common on shared hosting systems).

    Another thing I have seen cause a problem is that when files are being validity checked and they fail due to a corrupted bit it can halt the installation by breaking the flow with a malformed character or not properly closing a connection it has open resulting in a blocking thread hanging until some of the defensive code in the server realises it’s blocked and decided to recycle the process.

    There are many more reasons that things could have failed. It’s easy to speculate what MIGHT cause the issue but a lot harder to say definitively it SURELY caused the problem. It’s especially hard to diagnose the reason without full access to server logs and to have logging levels on their absolute maximum (which can be a slowdown in production setups and is usually not enabled at hosting companies).

    My specific theory here as to why your updates failed on 2 different sites at the same point is that it’s caused by permissions issues. An installer can create the files with 1 set of permissions and have different set of default permissions on the directories. I suspect that the directory permissions allowed it to add a new file to the folder as server user but it does not allow that server user to delete files as they are possibly owned by a different user or part of a different usergroup.

    What I suggest is that you perform a manual update over FTP on 1 of the sites and see if it can fix it. If it does then I would look more closely at the permissions and what user owns each file and each directory. You can likely use 1 manual update to isolate the issue, perform steps to fix it on the other instances and then with some luck you could perform the updates on all the additional sites using the autoupdater system.

    Reply To: Update to 4.9 ~ Fatal error: Cannot redeclare get_shortcut_link()

Share This Page

Web Hosting