PHPackages                             itzmekhokan/github-plugin-updater - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. itzmekhokan/github-plugin-updater

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

itzmekhokan/github-plugin-updater
=================================

Give any GitHub-hosted WordPress plugin wp.org-style update notices and one-click updates in the admin, without hosting on wp.org. Public and private/organization repositories supported.

v0.1.0(1mo ago)00GPL-2.0-or-laterPHPPHP &gt;=7.4CI passing

Since Jul 6Pushed 1mo agoCompare

[ Source](https://github.com/itzmekhokan/github-plugin-updater)[ Packagist](https://packagist.org/packages/itzmekhokan/github-plugin-updater)[ Docs](https://github.com/itzmekhokan/github-plugin-updater)[ RSS](/packages/itzmekhokan-github-plugin-updater/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

github-plugin-updater
=====================

[](#github-plugin-updater)

Give any **GitHub-hosted WordPress plugin** the same "update available" notice and one-click update experience as wp.org — without publishing to wp.org. Works with **public**, **private**, and **organization** repositories.

This is a Composer **library** you require inside your own plugin. There is no separate plugin for site owners to install and nothing to configure at the site level (beyond a token for private repos).

Why
---

[](#why)

Composer VCS repositories can install a GitHub plugin, but updating still means a developer running `composer update`. This library instead checks GitHub **releases** (or tags) at runtime and surfaces updates directly in the WordPress admin, so site owners update with one click like any wp.org plugin.

Install
-------

[](#install)

```
composer require itzmekhokan/github-plugin-updater
```

Usage
-----

[](#usage)

### Zero-config (headers)

[](#zero-config-headers)

Add an `Update URI` header pointing at your repo, then boot from your main file:

```
/**
 * Plugin Name: Awesome Plugin
 * Version:     1.4.0
 * Update URI:  https://github.com/acme/awesome-plugin
 */

require __DIR__ . '/vendor/autoload.php';

\Itzmekhokan\GitHubPluginUpdater\Bootstrap::auto( __FILE__ );
```

### Explicit config

[](#explicit-config)

```
\Itzmekhokan\GitHubPluginUpdater\Bootstrap::boot( __FILE__, array(
	'repository'        => 'acme/awesome-plugin',
	'source'            => 'release',   // 'release' (default) or 'tag'
	'prefer-asset'      => true,        // use an uploaded .zip asset over the source zipball
	'allow-prereleases' => false,
	'token'             => 'env:GH_UPDATER_TOKEN', // omit entirely for public repos
) );
```

### composer.json (extra)

[](#composerjson-extra)

Instead of passing config in PHP, declare it once in the plugin's `composer.json` and call `Bootstrap::auto( __FILE__ )`:

```
{
	"extra": {
		"github-plugin-updater": {
			"repository": "acme/awesome-plugin",
			"source": "release",
			"prefer-asset": true,
			"allow-prereleases": false,
			"token": "env:GH_UPDATER_TOKEN"
		}
	}
}
```

Private &amp; organization repositories
---------------------------------------

[](#private--organization-repositories)

Provide a GitHub Personal Access Token with `repo` (or fine-grained *Contents: read*) scope. The `token` value is a **spec**, resolved in this order:

SpecSource`env:VAR`Environment variable `VAR``constant:NAME`PHP constant `NAME` (define it in `wp-config.php`)`option`WordPress option (see note)If no per-plugin token is set, a global constant is used as a fallback so a site owner can configure one token for all managed plugins:

```
// wp-config.php
define( 'GITHUB_PLUGIN_UPDATER_TOKEN', 'ghp_xxx' );
```

> **Note:** the `option` source stores the token as a plain option in v1.0. Prefer `env`/`constant` in production. Encrypted at-rest storage lands in v1.1.

How it works
------------

[](#how-it-works)

Four WordPress hooks:

- `pre_set_site_transient_update_plugins` — injects the "update available" record.
- `plugins_api` — serves the "View details" modal from the GitHub release notes.
- `upgrader_source_selection` — renames GitHub's `owner-repo-/` folder to your plugin slug.
- `upgrader_pre_download` — downloads private archives with the correct two-step auth dance (send auth to the API host, drop it on the signed redirect).

Responses are cached for 12 hours and revalidated with ETags, so the checker stays well under GitHub's 60 req/hr anonymous rate limit.

Requirements
------------

[](#requirements)

- PHP 7.4+
- WordPress 5.8+

Roadmap
-------

[](#roadmap)

- **v1.1** — encrypted token storage + settings UI, `wp gpu check` WP-CLI command, branch/prerelease tracking.
- **v1.2** — provider abstraction (GitLab, Bitbucket), release-asset checksum/attestation verification.

License
-------

[](#license)

GPL-2.0-or-later

###  Health Score

30

—

LowBetter than 61% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

49d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13062380?v=4)[Khokan Sardar](/maintainers/itzmekhokan)[@itzmekhokan](https://github.com/itzmekhokan)

---

Top Contributors

[![itzmekhokan](https://avatars.githubusercontent.com/u/13062380?v=4)](https://github.com/itzmekhokan "itzmekhokan (6 commits)")

---

Tags

plugincomposerwordpressgithubself-updateupdater

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/itzmekhokan-github-plugin-updater/health.svg)

```
[![Health](https://phpackages.com/badges/itzmekhokan-github-plugin-updater/health.svg)](https://phpackages.com/packages/itzmekhokan-github-plugin-updater)
```

###  Alternatives

[ffraenz/private-composer-installer

A composer install helper for private packages

2341.8M5](/packages/ffraenz-private-composer-installer)[philippbaschke/acf-pro-installer

An install helper for Advanced Custom Fields PRO

283724.6k](/packages/philippbaschke-acf-pro-installer)[automattic/jetpack-autoloader

Creates a custom autoloader for a plugin or theme.

566.3M167](/packages/automattic-jetpack-autoloader)[afragen/git-updater

A plugin to automatically update GitHub, Bitbucket, GitLab, or Gitea hosted plugins, themes, and language packs.

3.3k1.8k](/packages/afragen-git-updater)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
