Open
Description
With a WordPress site on WordPress 5.1 that I want to downgrade to 5.0.3 for testing:
$ wp core update --version=5.0.3
Success: WordPress is up to date.
There are several problems with this message:
- "Success" is wrong; the installed WordPress version did not change
- "up to date" is not the desired outcome. Could this message be expanded to "Wordpress is up to date at version $version"?
- When attempting to "upgrade" to a version older than the currently-installed version,
wp core update
doesn't explain to the user why the version was not updated. Some additional verbosity here would be appreciated: "Did not upgrade to 5.0.3 because the newer version 5.1 is already installed. retry with --force to ignore this check."
A solution to this problem might look like:
- Do not display "Success" if the safety checks in
wp core update
abort an update - Display the installed version number in "WordPress is up to date" messages
- When an "upgrade" to an older version is blocked by the presence of a newer version, output a message saying that that is the case, listing the newer version currently installed, and provide a "did you mean to --force?" message
The successful command, which is irrelevant to this issue
The successful command was:$ wp core update --version=5.0.3 --force
Updating to version 5.0.3 (en_US)...
Downloading update from https://wordpress.org/wordpress-5.0.3.zip...
Unpacking the update...
Cleaning up files...
File removed: wp-includes/ms-site.php
File removed: wp-includes/ms-network.php
File removed: wp-includes/js/backbone.js
File removed: wp-includes/js/underscore.js
File removed: wp-includes/js/codemirror/fakejshint.js
File removed: wp-includes/js/codemirror/esprima.js
6 files cleaned up.
Success: WordPress updated successfully.