Add --actual flag to show database version from options table in multisite
#306
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.
wp core version --extrareads database version fromwp-includes/version.php, showing the expected version rather than the actual version stored in the options table. In multisite installations, subsites can have different database versions, making this particularly problematic.Changes
--actualflag requiring--extrato queryget_option('db_version')instead of reading the file@when before_wp_load, delegates to newversion_db_actualsubcommand when--actualis usedUsage
The flag validates that
--extrais present and properly escapes arguments when delegating to the helper command.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.wordpress.org/usr/bin/curl curl -s REDACTED(dns block)downloads.wordpress.org/usr/bin/curl curl -sSfL REDACTED(dns block)If you need me to access, download, or install something from one of these locations, you can either:
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.