• Resolved SianiB

    (@sianib)


    Since attempting an upgrade, when I attempt to log into my website I get the error message:

    Fatal error: Call to undefined function wp_unslash() in /web/sites/user/0/233/204440/public/www/wp-admin/menu.php on line 153

    My upgrade was possibly interrupted before it was finished due to a power cut.I’m afraid that because I can’t log in, I can’t tell you which version of WordPress I was running and which version it was upgrading to, but presumably it was upgrading to the latest version.

    I’m afraid I’m a WordPress novice, so please be gentle with me. I can just about manage to connect to my site via ftp. I had backed up the ‘www’ folder before starting and am wondering if I can just put that back up?

    I’m nervous about doing anything that might make things worse because at the moment my website is still functioning, I just can’t access it to edit.

    My website is . Many thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi SianiB,

    Hmm, if we knew the version you were upgrading from – we could “reset” your WordPress core files to that version again so long as the database was never updated.

    Did you ever get to the point in the installation where it prompts you to update the database before the power cut off?

    Moderator t-p

    (@t-p)

    First let’s try a few basic troubleshooting steps:
    – Flushing any caching plugins you might be running, as well as server and/or browser caches.
    – deactivating ALL (yes all) plugins temporarily to see if this resolves the problem (plugin functions can interfere). If this works, re-activate them individually (one-by-one) to find the problematic plugin(s).
    – If you can’t get into your admin dashboard, try resetting the plugins folder by FTP or PhpMyAdmin (read How to deactivate all plugins when you can’t log in to wp-admin”” if you need help). Sometimes, an apparently inactive plugin can still cause problems. Also remember to deactivate any plugins in the mu-plugins folder (if you have created such folder). The easiest way is to rename that folder to mu-plugins-old.
    – If that does not resolve the issue, try switching to the unedited default Twenty Fifteen theme for a moment using the WP dashboard to rule out any theme-specific issue (theme functions can interfere like plugins). If you don’t have access to your admin area, use FTP or whatever file management application your host provides. Navigate to /wp-content/themes/ and switch to the default theme by renaming your current theme’s folder by adding “-old” to the end of the folder name. Alternately, you can remove other themes except the default theme. That will force your site to use it.
    – If all the above steps do not resolve the issue, then try MANUAL updating. Download a fresh copy of the WordPress .zip file to your computer, unzip it, and use that to copy up all files and folders EXCEPT the wp-config.php file and the /wp-content/ directory. You may need to delete the old copies of files & folder on your server before uploading the new ones. Read the Manual Update directions first.
    If you haven’t already done, always backup everything (including your database) before doing any actions, just in case something really goes wrong.

    Thread Starter SianiB

    (@sianib)

    Hi Rachel, I set the upgrade running then left the room, so I never saw or responded to any prompts.

    I take it that I can’t just delete the ‘www’ folder on the server and replace it with the copy I backed up before starting the upgrade then? If not then I will start working through Tara’s suggestions.

    Sorry to be slow to reply btw, had to wait for baby’s creche day to work on this.

    Many thanks, your help is really appreciated.

    Hi SianiB,

    The reason you can’t carelessly replace the www folder it 1. most likely that folder doesn’t just contain the core files and the core files are all you’d need to revert your install to an earlier version. So you may break your site further if you overwrite the www folder completely. And 2. if the database was upgraded, and you do not have a copy of the old database, reverting the core files to an earlier version without doing the same to the database can break your site even further as well. That’s why I was asking about the prompt.

    Sometimes if your database hasn’t updated in the process and that is what’s possibly breaking your site, you can log out and back in and it will prompt you. If it doesn’t, you can manually go to the url which will be something like this:

    https://example.com/wordpress/wp-admin/upgrade.php

    You can find more info on that on the WP Codex here.

    So in theory, if the issue is that the upgrade didn’t complete due to the database, this should fix it. If not, then one of two things might’ve happened:

    The upgrade did finish and something in your theme/plugins is breaking due to the upgrade. This is where I’d follow Tara’s suggestions to de-activate plugins and try a Twenty-something theme to troubleshoot. Also try setting your wp-config.php file where it has the debug line to false.

    More on how to debug here on the WP Codex.

    And the second thing that might’ve happened is the upgrade stopped mid-upgrade and has nothing to do with the database so then you’d just revert back by just taking the wp-includes/wp-admin folders from your saved copy and replacing the ones on your server. There’s a better step by step on how to manually upgrade, except in your case you’d be using the steps to revert on here on the Codex as well.

    I hope one of these is the case.

    You can also check the Codex’s Common Installation problems to see if anything there is helpful.

    Good luck!

    Thread Starter SianiB

    (@sianib)

    I’ve finally found time & confidence to fix this – the manual upgrade was what resolved the problem in the end. Thank you so much for your help ??

    Moderator t-p

    (@t-p)

    You are welcome ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatal Error after attempted upgrade’ is closed to new replies.