PHPackages                             afragen/git-updater-lite - 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. afragen/git-updater-lite

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

afragen/git-updater-lite
========================

A simple class to integrate with Git Updater for standalone plugin/theme updates.

2.8.4(2mo ago)201.7k—7.1%4[1 issues](https://github.com/afragen/git-updater-lite/issues)MITPHPPHP &gt;=7.4CI passing

Since Dec 1Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/afragen/git-updater-lite)[ Packagist](https://packagist.org/packages/afragen/git-updater-lite)[ GitHub Sponsors](https://github.com/afragen)[ RSS](/packages/afragen-git-updater-lite/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (36)Used By (0)

Git Updater Lite
================

[](#git-updater-lite)

- Contributors: [Andy Fragen](https://github.com/afragen)
- Tags: plugin, theme, updater, git-updater
- Requires at least: 6.6
- Requires PHP: 7.4
- Donate link:
- License: MIT

A simple standalone library to enable automatic updates to your git hosted WordPress plugins or themes.

Description
-----------

[](#description)

**This is version 2.x and contains a breaking change from 1.5.x.**

This library was designed to be added to your git hosted plugin or theme to enable standalone updates.

You must have a publicly reachable site that will be used for dynamically retrieving the update API data.

- [Git Updater](https://git-updater.com) is required on a site where all of the release versions of your plugins and themes are installed.
- All of your plugins/themes **must** be integrated with Git Updater.
- You must be using Git Updater v12.9.0 or better.

Git Updater is capable of returning a [REST endpoint](https://git-updater.com/knowledge-base/remote-management-restful-endpoints/#articleTOC_3/) containing the `plugins_api()` or `themes_api()` data for your plugin/theme. You will pass this endpoint during the integration.

The REST endpoint format is as follows.

- plugins - `https://my-site.com/wp-json/git-updater/v1/update-api/?slug=my-plugin`
- themes - `https://my-site.com/wp-json/git-updater/v1/update-api/?slug=my-theme`

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

[](#installation)

Add via composer. `composer require afragen/git-updater-lite:^2`

- Add the `Update URI: ` header to your plugin or theme headers. Where `` is the domain to the update server, eg `https://git-updater.com`.
- Add the following code to your plugin file or theme's functions.php file.

```
require_once __DIR__ . '/vendor/afragen/git-updater-lite/Lite.php';
( new \Fragen\Git_Updater\Lite( __FILE__ ) )->run();
```

An example integrated plugin is here,

```
