URL to latest.tar.gz



WordPress provides a direct URL for latest.tar.gz, which is easy to remember when needed.
Does CP have one or plan to have one? This would be different from /latest Github link.

Ex: https://wordpress.org/latest.tar.gz

It would make it easy to use with WP-CLI install command.



I think the easiest way to make this work would be to write a PHP script that uses the GitHub API to fetch a list of releases, pick the latest release, and redirect to the current download. Here’s the API endpoint to use: https://api.github.com/repos/ClassicPress/ClassicPress-release/releases

A .zip file would work just as well, or the script could support both.

If you or anyone else are willing to help with this, we’d appreciate it. This code can live at https://github.com/ClassicPress/ClassicPress-Network, much like the script in the join-slack directory.

Please be sure to set appropriate cache control headers in this script, and CloudFlare will cache the results for us as described here. Otherwise, we will quickly exhaust the rate limit for GitHub API calls. An expiration time of around 15 minutes should be sufficient.


So it would be an index.php file inside a directory, like slack example? I might throw this on my developer’s to-do list, should be pretty easy.


Yes, I think so. We’d probably have to write a server configuration rule to direct latest.zip and latest.tar.gz to the script, but we can do that.


Ok. Forgot to ask, should this be submitted as pull request to that repo?


Yes please.


:+1: .