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 separateupgrade.phppage 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 patch7965.2.diffwithout database cross-contamination, I configured two independent Docker instances using isolated Git worktrees:
- Single Site: Running on
http://localhost:8889- Multisite (
MULTISITE=1): Running onhttp://localhost:8890Simulating the Upgrade
- In both environments, I intentionally rolled back the database version in MySQL (
db_versionfrom64486to64485).- On Single Site, accessing
/wp-admin/profile.phptriggered 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 anddb_versionwas restored.- On Multisite, accessing
/wp-admin/preserved the standard network upgrade flow without any breakage or unexpected side effects.
Leave a Reply