Open squelchdesign opened 3 months ago
cc @sejas, I think a new wp-now release may be required. Although that's weird, I rememeber it used api.wp.org to fetch these versions.
wp-now
currently doesn't check updates. The decision was to avoid replacing the latest version by default, because you could have sites using that version and updating it for one will update it for all the sites.
I asked a similar question when the trunk version was introduced --wp=trunk
.
https://github.com/WordPress/playground-tools/pull/161#pullrequestreview-1890382317
I think a new flag to "force" download or "check" wp version updates would be very handy.
@squelchdesign, a new flag to check updates and download the new version if it exist would solve your issue?
you could have sites using that version and updating it for one will update it for all the sites
Yes… but if I have, say, three websites that are all set to "latest" and they all get automatically updated to the latest version as a result, that seems right to me (the user asked for "latest" and they got "latest")? If the user wanted to explicity keep a site on 6.4 they could specify --wp=6.4
could they not / would they not?
Aside from the DB update I don't see any obvious issue with the latest version automatically updating in the background for all sites that are opting to use that version. It's not a huge problem either way, as it's hardly a massive burden to delete the "latest" directory from the .wp-now directory to force a fresh download, but if that's to be the behaviour I think the tool needs to be incredibly explicit about it, or users might just assume that "latest means latest" and not bother to check that they really are on the latest version.
Agreed! I can prepare a PR and see if there is any pushback, which I don't expect to.
@sejas I created a PR: https://github.com/WordPress/playground-tools/pull/324.
Thanks for creating the PR! I assigned the issue to you.
I'm starting wp-now like this:
I first ran this when the latest WordPress was 6.4, and it correctly downloaded and used 6.4. Since then WP6.5 was rolled out, but wp-now continues to use 6.4:
Removing the "latest" directory before running wp-now triggers a re-download of "latest", bringing it up to the correct version:
Obviously it's good that wp-now doesn't download WordPress on every run, but it could do with checking whether what is in the "latest" dir matches what the update API says is the latest version.