[wp-trac] [WordPress Trac] #53252: Track WP-CLI version in Site Health
WordPress Trac
noreply at wordpress.org
Fri May 21 19:34:44 UTC 2021
#53252: Track WP-CLI version in Site Health
-----------------------------------+------------------------------
Reporter: wpscholar | Owner: wpscholar
Type: enhancement | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Site Health | Version: trunk
Severity: trivial | Resolution:
Keywords: 2nd-opinion has-patch | Focuses:
-----------------------------------+------------------------------
Comment (by wpscholar):
Replying to [comment:2 pbiron]:
> I like the thought, but wouldn't it be cleaner if WP_CLI, itself, hooked
into [https://developer.wordpress.org/reference/hooks/debug_information/
debug_information] and added the information?
>
> That is, I think this ticket should be closed and an issue opened at
https://github.com/wp-cli/wp-cli.
I suppose that is possible, but the assumption there is that WP-CLI would
actually have to be used in order to get the version of WP-CLI stored in
the WordPress database. It is also possible that a site's host doesn't
allow `shell_exec` which would prevent the method I've used here. Maybe
the better option is to do both? If `shell_exec` is enabled and WP-CLI is
present, log the version. Or, if WP-CLI has been used and stored a version
in the WP database, then we could pull that value instead.
A few downsides of doing it on the WP-CLI side though are that some
commands don't load up WordPress and, when they do, we may not want to
attempt a database write on every command.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53252#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list