Add --actual flag to show database version from options table in multisite#306
Draft
Add --actual flag to show database version from options table in multisite#306
--actual flag to show database version from options table in multisite#306Conversation
… reporting Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
…bcommand Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix misreporting of multisite site db version
Add Feb 2, 2026
--actual flag to show database version from options table in multisite
swissspidy
reviewed
Feb 3, 2026
swissspidy
reviewed
Feb 3, 2026
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan: Fix
wp core version --extramultisite database version reportingUnderstanding the Issue
wp core version --extrashows the expected/target database version fromwp-includes/version.phpwp_XX_optionstable--urlfor a specific site, users expect to see that site's actual database versionSolution Approach (based on maintainer comment)
Per @danielbachhuber's comment: "I wouldn't change the existing behavior. We could solve this with documentation, or some special flag."
Proposed minimal change: Add a new flag
--actualto show the actual database version from the database (requires WordPress to be loaded)Checklist
versioncommandversioncommand to support--actualflagversion-db-actualthat loads WordPress to query databaseSummary
All changes have been implemented, tested, and reviewed. The implementation:
Original prompt
This section details on the original issue you should resolve
<issue_title>
wp core version --extramisreports multisite site db version</issue_title><issue_description>## Bug Report
Describe the current, buggy behavior
With a multisite install I wanted to confirm the database version of a site within the network.
I expected the
wp core version --extra --url-example.com/sitecommand to achieve this accurately, it did not.Describe how other contributors can replicate this bug
To do so I ran the command:
The results of that command were:
I then examined the
wp_XX_optionstable related to the--urlsite listed in the previous command, the value of thedb_versionoption was37965I then ran the command:
The results of that command were:
Re-examining the
wp_XX_optionstable related to the--urlsite listed in the previous command, the value of thedb_versionoption is now45805Describe what you would expect as the correct outcome
When I run the command:
The results that I expect would be:
Provide a possible solution
If you happen to have a suggestion on how to fix this bug, please tell us in here.
Just leave this section out if you don't know how to fix it.
Provide additional context/Screenshots
Add any other context about the problem here.
If applicable, add screenshots to help explain (you can just drag&drop images into the Github issue).
</issue_description>
Comments on the Issue (you are @copilot in this section)
@danielbachhuber Thanks for the report, @ntwb. This would be nice to get fixed. @ernilambar @danielbachhuber Currently we are fetching details from `wp-includes...wp core version --extramisreports multisite site db version #142💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.