Link to latest plugin release

Continuing discussion from New ClassicPress plugin - ZP Disable Users:

I’m without a pc so my reply will be just an idea…
The link to the latest release could be

  • within .htaccess create a redirect from l/some-name to /latest.php?plugin=some-name
  • in latest.php fetch info about the latest release of some-name using GitHub API and redirect to it using header
1 Like

Yes it’s certainly possible with a little htaccess-related black magic :slight_smile:

I was just wondering if there are any github settings that might make things a bit more concise but I haven’t found any so far.

1 Like

Sweet! I’ve been zipping (releases) locally and uploading them to the release page(s). If you find a Git-centric way to achieve this that doesn’t append anything to the inner directory (ie, my-plugin-master,) I’d love to hear! PS. There’s online docs for the Update Manager. :slight_smile:

1 Like

I’ve just my phone now but tomorrow I’ll post the script I use for releases.
Anyway to get a zip:
git archive -o HEAD
and then you can use hub to draft (or even to publish) a release with zip file attached.
If you want to exclude something from the zip you can use the file .gitattributes.


Using GitHub features only: if your plugin zip should be the same as the files in the repository, with no build process and no files that you want to leave out, you can let GitHub build the zip file for you:

This is a nice option if you can use it, because it means you don’t have to upload a zip file either.

The “Source code (zip)” link on the release page points to there.


Or use a GH action if you need to build stuff, like remove dev files etc


Here is a good article on Zip Code Base with Github Actions for Releases.

GitHub actions are amazing.

1 Like

Totally. I use them to run PHPCS on every commit :slight_smile: Happy to share the config if you like


That would be great! I just opened a new thread so we can chat about it there: Using GitHub Actions :slight_smile:

Definitely - I will explore this aspect of Github, thanks.

1 Like