PHPackages                             aristath/github-theme-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. aristath/github-theme-updater

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

aristath/github-theme-updater
=============================

Custom updater class for WordPress themes hosted on Github

v0.2(2y ago)29468MITPHPPHP &gt;=5.6

Since May 11Pushed 2y ago2 watchersCompare

[ Source](https://github.com/aristath/github-theme-updater)[ Packagist](https://packagist.org/packages/aristath/github-theme-updater)[ Docs](https://aristath.github.io/github-theme-updater)[ RSS](/packages/aristath-github-theme-updater/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

github-theme-updater
====================

[](#github-theme-updater)

This is a simple class that lets you use github releases in your repository to handle your theme updates. A more robust solution would be to use the [github-updater](https://github.com/afragen/github-updater) plugin, but I simply refuse to include a 540kb library in my theme when I can accomplish what I need in less than 200 lines of code.
Is it perfect? No. Does it get the job done? Yes.

Implementing in the theme:
--------------------------

[](#implementing-in-the-theme)

1. Download the php file from this repo and include it in your theme, or require it using composer: ```
    composer require aristath/github-theme-updater
    ```
2. Change the namespace on the top of the file to match the one you use in your theme (you are using namespaces, right?).
3. Include the updater class in your functions.php file: ```
    add_action( 'after_setup_theme', function() {
    	get_template_part( 'inc/classes/Updater' );
    });
    ```
4. At the bottom of the `Updater.php` file init the updater: ```
    new Updater(
    	[
    		'name' => 'Gridd',                     // Theme Name.
    		'repo' => 'wplemon/gridd',             // Theme repository.
    		'slug' => 'gridd',                     // Theme Slug.
    		'url'  => 'https://wplemon.com/gridd', // Theme URL.
    		'ver'  => 1.2                          // Theme Version.
    	]
    );
    ```

Releasing an update on Github
-----------------------------

[](#releasing-an-update-on-github)

When you want to release an update you can simply go to your repository &gt; Releases and create a new release.

- The version should either be formatted as `1.2`, `1.2.3`, `v1.2` or `v1.2.3` etc. The version comparison will remove the `v` and the script will be able to compare versions. However, if you call your release-tag `tomato` don't expect it to work.
- You **have to upload a zip file.**. When creating your release, upload a `.zip` file in there. The default packages created by github have the version number inside the folder-name, and that has the potential to break things on user sites when updating. **This updater script will only detect the file uploaded as an asset manually by you**.

Advice
------

[](#advice)

- Use at your own risk. If you don't follow the instructions above, things will break.
- This script is as simple as it can be. If you find a bug, pull-requests are more than welcomed.

Why was this created?
---------------------

[](#why-was-this-created)

This project was created out of necessity for a theme submitted on wordpress.org. The theme-review process on wordpress.org takes a long time...

- The initial review is usually a coupe of months.
- If all goes well the theme proceeds to the final review which takes 2-4 months at the time of this writing.
- If your theme is tagged as accessibility-ready, then the theme has to wait for a 3rd review, and I currently have no idea how long that will take.

Overall a theme review can easily take more than 6 months.

In the meantime, life goes on. If your business depends on your themes, then you may want to implement an alternative method to provide updates for your theme so people can start using it and you can start growing.

Releasing your theme on w.org
-----------------------------

[](#releasing-your-theme-on-worg)

Remember to remove the script when uploading an update on w.org. When your theme goes live you can remove it from the repository as well, this is only meant as a stepping stone.

Until your theme goes live you can ignore the class inclusion if you did it using `get_template_part` as in the example above. If the file doesn't exist nothing bad will happen.

Personally I prefer using a `.gitattributes` file to exclude the development files like `.sass`, `.map`, `.editorconfig` etc. If you use such a file on your project, you can just add `Updater.php export-ignore` in there and it won't be included in your theme export when you get your build ready for w.org

That's all. I hope you enjoy using this and it makes your life somewhat easier.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% 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

Every ~1686 days

Total

2

Last Release

875d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/471c510b2590bce99d5e41cc9b817f0c0d420f08d0930e70b18299f993ffa965?d=identicon)[aristath](/maintainers/aristath)

---

Top Contributors

[![aristath](https://avatars.githubusercontent.com/u/588688?v=4)](https://github.com/aristath "aristath (10 commits)")[![baikaresandip](https://avatars.githubusercontent.com/u/15994201?v=4)](https://github.com/baikaresandip "baikaresandip (1 commits)")

---

Tags

wordpressgithubTheme Updater

### Embed Badge

![Health badge](/badges/aristath-github-theme-updater/health.svg)

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

###  Alternatives

[tgmpa/tgm-plugin-activation

TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins).

1.8k222.5k13](/packages/tgmpa-tgm-plugin-activation)[aristath/kirki

Extending the WordPress customizer

1.3k73.0k4](/packages/aristath-kirki)[afragen/git-updater

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

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

PHPackages © 2026

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