How Can We Help?
This plugin was designed to simply update any GitHub hosted WordPress plugin or theme. Your plugin or theme must contain a header in the style.css header or in the plugin’s header denoting the location on GitHub. The format is as follows.
GitHub Plugin URI: afragen/git-updater
GitHub Plugin URI: https://github.com/afragen/git-updater
GitHub Theme URI: afragen/test-child
GitHub Theme URI: https://github.com/afragen/test-child
…where the above URI leads to the owner/repository of your theme or plugin. The URI may be in the format
https://github.com/<owner>/<repo> or the short format
<owner>/<repo>. You do not need both. Only one Plugin or Theme URI is required. You should not include any extensions like
Refer to Usage for more information about required headers.
An optional header is available for use if your plugin or theme has a primary branch other than
master. Historically a new repository created in GitHub was created with a
master branch. This has changed and new repositories are created in a
main branch. You must add the
Primary Branch: main header to your repository’s main plugin file or theme’s style.css file or the API will respond with a 404 error when checking.
The default is still
master and for historical reasons this has been more consistent among GitHub, Bitbucket, GitLab, etc. If you, as a developer, wish to use another branch as your production-ready branch, as in git-flow, you can now set this via the
Primary Branch header.
Primary Branch: main if you have changed your repository to use
main instead of
An optional header is available for use if your plugin or theme requires updating via a release asset.
Release Asset:. eg.,
Release Asset: true.
Your release asset filename might be generated automatically. While there is no restriction on what the release asset may be named, if there are more than one release assets per release, then naming restrictions will be required in the following format. The asset name used for updating must be in the following format,
$repo is the repository slug and
$tag is the newest release tag, example
There is support for GitLab Releases & Build Artifacts which may be used as a release asset. You must also add the header,
GitLab CI Job:, with the build job name.
Branch switching will not be available for repositories using release assets to update.
You must tag your releases to use this feature.
NB: If your current version number and version number inside a release asset do not match you can end up in an endless cycle of seeing an update and then updating to an older release asset. GitHub Updater checks the repository for the version number but will serve the latest release asset as the download package.