Ticket #7965 (Database Upgrade Inline Admin Notice)

Introduction
In the world of open source, some tickets have deep history. Trac Ticket #7965 was originally opened 18 years ago! Its goal was simple yet impactful: when WordPress updates its database schema, administrators shouldn’t be abruptly redirected to a separate upgrade.php page requiring extra clicks. Instead, the upgrade should run inline and display a clean, dismissible admin notice.

The Technical Challenge: Single Site vs. Multisite
While upgrading single-site installs inline is straightforward, WordPress Multisite (networks of sites) uses a distinct upgrade procedure. A valid patch had to guarantee that single-site users enjoyed the new smooth experience while ensuring Multisite networks remained completely unaffected.

My Dual-Environment Test Setup
To test patch 7965.2.diff without database cross-contamination, I configured two independent Docker instances using isolated Git worktrees:

  • Single Site: Running on http://localhost:8889
  • Multisite (MULTISITE=1): Running on http://localhost:8890

Simulating the Upgrade

  1. In both environments, I intentionally rolled back the database version in MySQL (db_version from 64486 to 64485).
  2. On Single Site, accessing /wp-admin/profile.php triggered the upgrade silently in the background. Instead of a redirect, the page loaded immediately with a green dismissible notice: “Your WordPress database has been successfully updated!”. Reloading confirmed the notice did not reappear and db_version was restored.
  3. On Multisite, accessing /wp-admin/ preserved the standard network upgrade flow without any breakage or unexpected side effects.

Leave a Reply