How to fix being redirected to /wp-admin/upgrade.php?_wp_http_referer=%2Fwp-admin%2F after login
This occurs when the version number in wp-include/version.php is different than the one in SQL's wp_option TABLE > db_version value.
- Create a backup of the database and files
- Check in the database the value of "db_version".
- Update wp-include/version.php to force a match to the database's version.
- This should at least get you access to the admin interface.
- Export your website's data in xml format.
- Try upgrading WordPress to latest version.
- If it fails, restore the backup from step 1, or start a new WordPress and import your data from the .xml obtained in step 5.