The HRSWP GitHub Updater plugin helps to manage updates for plugins in WordPress that provide a GitHub repository URL as their Update URI.
The HRSWP GitHub Updater plugin extends the built-in WordPress updating system to include plugins hosted on GitHub instead of WordPress.org. If a plugin provides a valid GitHub API repository URL in the Update URI
plugin header field, the HRSWP GitHub Updater plugin will watch for updates and enable updating from the WP plugins screen as with WordPress.org-hosted plugins.
This plugin is fully opt-in. It will automatically try to identify all GitHub-hosted plugins installed on the site, but it will not manage them until they are selected on this plugin's settings screen. Unmanaged GitHub-hosted plugins will behave as they always have. Once selected to be managed, this plugin will attempt to get the plugin details and update info from the GitHub repo.
If a plugin supplies a GitHub API URL, this plugin will only return updates if the URL matches one of the following formats:
https://api.github.com/repos/{owner}/{repo}/releases/latest
https://api.github.com/repos/{owner}/{repo}/releases/tags/{tag}
https://api.github.com/repos/{owner}/{repo}/releases/{release_id}
This plugin is not in the WordPress plugins directory. You have to install it manually either with SFTP or from the WordPress plugins screen:
- Download the latest version from GitHub and rename the .zip file to:
hrswp-github-updater.zip
. - From here you can either extract the files into your plugins directory via SFTP or navigate to the Plugins screen in the admin area of your site to upload it through the plugin uploader (steps 3-5).
- Select Plugins > Add New and then select the "Upload Plugin" button.
- Select "Browse" and locate the downloaded .zip file for the plugin (it must be a file in .zip format) on your computer. Select "Install Now."
- You should receive a message that the plugin installed correctly. Select "Activate Plugin" or return to the plugins page to activate later.
Enable this plugin on the HRSWP GitHub Updater settings screen for managed updates.
This plugin does not store user information. It stores two options in the database to track the plugin status (activation status, version, etc.) and management settings. It also stores a transient for each managed plugin with repo data and another to manage timeouts. Deactivating the plugin through the WordPress plugins screen UI will retain the options. Uninstalling through the WP interface will delete all of the options and transients. Deleting it directly from the server (not through the plugins screen UI) will circumvent this cleanup action and will not delete the plugin data.
The HRSWP GitHub Updater plugin development environment relies on NPM and Composer. The package.json
and composer.json
configuration files manage dependencies for testing and building the production version of the theme. The NPM scripts in package.json
do most of the heavy lifting. Please follow the development workflow outlined in the Contributing guide.
- Clone the HRSWP GitHub Updater plugin to a directory on your computer.
- Change into that directory.
- Install the NPM and Composer dependencies.
- Ensure linting and coding standards checks are working -- this should exit with zero (0) errors.
- Create a new branch for local development.
In a terminal:
git clone https://github.com/washingtonstateuniversity/hrswp-github-updater.git
cd hrswp-github-updater
npm install
composer install
npm test -s
git checkout -b new-branch-name
The following commands will handle basic build functions. (Remove the -s
flag to show additional debug info.)
npm test -s
: Check all PHP and CSS files for coding standards compliance.
See the scripts section of package.json
for additional available commands.
Active: WSU HRS actively works on this plugin. We plan to continue work for the foreseeable future, adding new features, enhancing existing ones, and maintaining compatability with the latest version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.
All notable changes are documented in the CHANGELOG.md, with dates and version numbers.
Please submit bugs and feature requests through GitHub Issues. Refer to CONTRIBUTING.md for the development workflow and details for submitting pull requests.