PHPackages                             wpboilerplate/wpb-updater-checker-github - 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. wpboilerplate/wpb-updater-checker-github

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

wpboilerplate/wpb-updater-checker-github
========================================

Composer to autoload the Updater via Github

132PHP

Since May 15Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/WPBoilerplate/wpb-updater-checker-github)[ Packagist](https://packagist.org/packages/wpboilerplate/wpb-updater-checker-github)[ RSS](/packages/wpboilerplate-wpb-updater-checker-github/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

WPBoilerplate Updater Checker — GitHub
======================================

[](#wpboilerplate-updater-checker--github)

A Composer library that gives any GitHub-hosted WordPress plugin automatic update notifications inside the WordPress admin, using the [Plugin Update Checker](https://github.com/YahnisElsts/plugin-update-checker) library.

---

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

[](#requirements)

- PHP 7.4+
- WordPress 5.0+
- Composer
- A GitHub repository for the plugin you want to auto-update

**Internal Composer dependencies** (pulled in automatically):

PackageConstraint`yahnis-elsts/plugin-update-checker``dev-master``automattic/jetpack-autoloader``^5.0`---

Installation
------------

[](#installation)

Add the library to the `composer.json` of your **WordPress project or plugin**:

```
{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/WPBoilerplate/wpb-updater-checker-github"
        }
    ],
    "require": {
        "wpboilerplate/wpb-updater-checker-github": "dev-main"
    }
}
```

Then install:

```
composer install
```

Make sure Composer's autoloader is loaded in your plugin or theme:

```
require_once __DIR__ . '/vendor/autoload.php';
```

---

GitHub Repository Settings
--------------------------

[](#github-repository-settings)

The following settings must be in place on each GitHub repo you want to track:

### 1. Repository visibility

[](#1-repository-visibility)

- **Public repo:** works out of the box — no token needed.
- **Private repo:** requires a GitHub Personal Access Token (PAT) with at least `repo` scope. See [GitHub PAT docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).

### 2. Plugin version header

[](#2-plugin-version-header)

The `Version` field in your plugin's main PHP file **must be kept up to date** — this is what WordPress (and the update checker) reads to decide whether an update is available:

```
/**
 * Plugin Name: My Plugin
 * Version:     1.2.0
 */
```

Bump this value and push to your release branch to trigger update notifications.

### 3. Release branch

[](#3-release-branch)

Decide which branch holds your stable releases (commonly `main` or `stable`). The checker watches this branch's `Version` header. Keep feature work on other branches and only merge to the release branch when ready.

### 4. GitHub Releases (optional — only if using `release-assets`)

[](#4-github-releases-optional--only-if-using-release-assets)

If you set `'release-assets' => true`, the updater will look for a ZIP file attached to a **GitHub Release** instead of downloading the branch archive. In that case:

- Create a GitHub Release tagged to match the version (e.g. `v1.2.0`).
- Attach the plugin ZIP as a release asset.
- The release tag must exist on the release branch.

---

Usage
-----

[](#usage)

### Basic — single plugin

[](#basic--single-plugin)

In your plugin's main file, after loading Composer's autoloader:

```
require_once __DIR__ . '/vendor/autoload.php';

new WPBoilerplate_Updater_Checker_Github( [
    'repo'           => 'https://github.com/YourOrg/your-plugin',
    'file_path'      => __FILE__,
    'name_slug'      => 'your-plugin',
    'release_branch' => 'main',
] );
```

### Private repository

[](#private-repository)

```
new WPBoilerplate_Updater_Checker_Github( [
    'repo'           => 'https://github.com/YourOrg/your-private-plugin',
    'file_path'      => __FILE__,
    'name_slug'      => 'your-private-plugin',
    'release_branch' => 'main',
    'token'          => 'ghp_xxxxxxxxxxxxxxxxxxxx', // GitHub PAT
] );
```

Store tokens in `wp-config.php` as constants rather than hard-coding them:

```
// wp-config.php
define( 'MY_PLUGIN_GITHUB_TOKEN', 'ghp_xxxxxxxxxxxxxxxxxxxx' );

// plugin file
new WPBoilerplate_Updater_Checker_Github( [
    'repo'      => 'https://github.com/YourOrg/your-private-plugin',
    'file_path' => __FILE__,
    'name_slug' => 'your-private-plugin',
    'token'     => defined( 'MY_PLUGIN_GITHUB_TOKEN' ) ? MY_PLUGIN_GITHUB_TOKEN : '',
] );
```

### Using GitHub Release assets

[](#using-github-release-assets)

```
new WPBoilerplate_Updater_Checker_Github( [
    'repo'           => 'https://github.com/YourOrg/your-plugin',
    'file_path'      => __FILE__,
    'name_slug'      => 'your-plugin',
    'release_branch' => 'main',
    'release-assets' => true,
] );
```

### Multiple plugins via the filter

[](#multiple-plugins-via-the-filter)

If you manage several GitHub-hosted plugins, register all of them through a single filter instead of creating multiple class instances:

```
// Instantiate once (empty constructor is fine) to register the admin_init hook.
new WPBoilerplate_Updater_Checker_Github();

add_filter( 'wpboilerplate_updater_checker_github', function ( $packages ) {
    $packages[] = [
        'repo'           => 'https://github.com/YourOrg/plugin-one',
        'file_path'      => WP_PLUGIN_DIR . '/plugin-one/plugin-one.php',
        'name_slug'      => 'plugin-one',
        'release_branch' => 'main',
    ];
    $packages[] = [
        'repo'           => 'https://github.com/YourOrg/plugin-two',
        'file_path'      => WP_PLUGIN_DIR . '/plugin-two/plugin-two.php',
        'name_slug'      => 'plugin-two',
        'release_branch' => 'stable',
        'token'          => defined( 'PLUGIN_TWO_TOKEN' ) ? PLUGIN_TWO_TOKEN : '',
    ];
    return $packages;
} );
```

---

Package Configuration Reference
-------------------------------

[](#package-configuration-reference)

KeyTypeRequiredDefaultDescription`repo`stringYes—Full GitHub repository URL`file_path`stringYes—Absolute path to the plugin's main PHP file`name_slug`stringYes—Unique plugin slug (must be unique across all registered packages)`release_branch`stringNo`'main'`Branch the updater watches for new versions`token`stringNo`''`GitHub PAT — required for private repos`release-assets`boolNo`false`When `true`, downloads update ZIPs from GitHub Release assets---

How Updates Are Delivered
-------------------------

[](#how-updates-are-delivered)

1. You push a commit to the release branch with a bumped `Version` header (or publish a GitHub Release with an asset if `release-assets` is enabled).
2. When an admin visits the WordPress dashboard, the Plugin Update Checker queries GitHub and compares versions.
3. WordPress shows the standard **"update available"** notice on the Plugins screen.
4. Admins can update the plugin with one click, exactly like a plugin from WordPress.org.

---

Troubleshooting
---------------

[](#troubleshooting)

SymptomLikely causeFixNo update notice after pushing a new version`Version` header not bumpedBump `Version:` in the main plugin file and push404 / authentication errorsPrivate repo without a tokenAdd a valid `token` to the package configUpdate notice but download failsWrong `file_path`Ensure `file_path` is the absolute path to the plugin's main PHP fileUpdate shows but wrong ZIP downloaded`release-assets` mismatchSet `'release-assets' => true` only if you attach ZIP assets to GitHub ReleasesUpdates checked too infrequentlyPlugin Update Checker cacheClear transients via WP-CLI: `wp transient delete --all`---

License
-------

[](#license)

GPL-2.0-or-later

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance60

Regular maintenance activity

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity11

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22215595?v=4)[Deepak Gupta](/maintainers/raftaar1191)[@raftaar1191](https://github.com/raftaar1191)

---

Top Contributors

[![raftaar1191](https://avatars.githubusercontent.com/u/22215595?v=4)](https://github.com/raftaar1191 "raftaar1191 (10 commits)")

### Embed Badge

![Health badge](/badges/wpboilerplate-wpb-updater-checker-github/health.svg)

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

###  Alternatives

[skovachev/fakefactory

A model factory package for Laravel 4 with expressive API for creating custom tailored dummy objects

291.1k](/packages/skovachev-fakefactory)

PHPackages © 2026

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