Wordpress backend always redirected to /wp-admin/upgrade.php

After logging in, wp-admin always redirects to /wp-admin/upgrade.php?_wp_http_referer=%2Fwp-admin%2F. How can I fix this redirection issue?

How to fix being redirected to /wp-admin/upgrade.php?_wp_http_referer=%2Fwp-admin%2F after login
When attempting to log in to the backend of a WordPress site, the login process redirects to the address wp-admin/upgrade.php?_wp_http_referer=%2Fwp-admin%2F. No errors are displayed on the page or recorded in the error log. 
In this blog, I will show you how to fix that. Please follow the solutions below.

Solution 1:

Navigate to the /wp-content/ folder of your site and locate the object-cache.php file.
Remove the file or rename the file to anything you prefer, though it's advisable to append something like "-old" at the end of the current name. This makes it easier to identify and recall the purpose of the file later on.

Rename object-cache in wp-content folder

If the file is not present, please proceed to solution 2.

Solution 2:

This occurs when the version number in wp-includes/version.php differs from the one stored in the "db_version" value of the "wp_options" table in SQL.

To resolve this issue:
Create a backup of both the database and files.
Check the value of "db_version" in the database.

SELECT option_value FROM wp_options WHERE option_name = 'db_version';

Check db_version in wordpress
Update wp-includes/version.php to ensure it matches the version stored in the database.

Solution 3:

A misconfigured .htaccess file can cause access issues. Try renaming your .htaccess file (e.g., to .htaccess_old) and check if the issue resolves. If it does, reset your .htaccess file with the correct configuration.
Alternatively, a plugin or theme conflict might be the cause. Rename your plugins folder (e.g., to plugins_old) to deactivate all plugins. If this resolves the issue, revert the folder name back to "plugins" and reactivate each plugin one by one to identify the problematic one.

Thank You!