DEV Community

Cover image for Fixing the WordPress Redirect Issue to /wp-admin/upgrade.php
raielly
raielly

Posted on

1 1 1 1 1

Fixing the WordPress Redirect Issue to /wp-admin/upgrade.php

If you're suddenly being redirected to /wp-admin/upgrade.php when trying to log into your WordPress site, don’t worry—this is a common issue and can be fixed in just a few steps.

Why Does This Happen?

This usually happens when there’s a mismatch between your WordPress database version and the actual WordPress files. The system thinks an update is needed when it might not be.

How to Fix It

Follow these simple steps to resolve the issue:

1. Check Your Database Version

  • Log in to your hosting control panel.
  • Open phpMyAdmin and find your WordPress database.
  • Locate the wp_options table and check the db_version value.

Image description

2. Update Your WordPress Version File

  • Access your site’s files using FTP or your hosting’s File Manager.
  • Navigate to wp-includes/ and open the version.php file.
  • Compare the database version from wp_options with the $wp_db_version value in version.php.
  • If they don’t match, update the version.php file to reflect the correct database version and save the changes.

Image description

That’s it! Now, try logging in again, and your issue should be resolved.

Happy coding! 🚀

Heroku

Deploy with ease. Manage efficiently. Scale faster.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

Image of Timescale

PostgreSQL for Agentic AI — Build Autonomous Apps on One Stack 1️⃣

pgai turns PostgreSQL into an AI-native database for building RAG pipelines and intelligent agents. Run vector search, embeddings, and LLMs—all in SQL

Build Today

👋 Kindness is contagious

DEV shines when you're signed in, unlocking a customized experience with features like dark mode!

Okay