PHPackages                             webshr/wp-update-server - 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. [API Development](/categories/api)
4. /
5. webshr/wp-update-server

ActiveLibrary[API Development](/categories/api)

webshr/wp-update-server
=======================

Headless standalone update server for WordPress plugins and themes.

0.1.0(2w ago)03MITPHPPHP &gt;=8.2CI passing

Since May 22Pushed 2w agoCompare

[ Source](https://github.com/webshr/wp-update-server)[ Packagist](https://packagist.org/packages/webshr/wp-update-server)[ Docs](https://github.com/webshr/wp-update-server/)[ RSS](/packages/webshr-wp-update-server/feed)WikiDiscussions main Synced 1w ago

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

Webshr WP Update Server
=======================

[](#webshr-wp-update-server)

A modern, headless, standalone PHP update server for WordPress plugins and themes.

It serves WordPress-compatible update metadata and package downloads without adding a WordPress admin UI or requiring a WordPress installation. Filesystem ZIP packages are supported out of the box, and GitHub Releases can be used as an optional remote package source.

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

[](#requirements)

- PHP 8.2+
- Composer
- PHP extensions: `json`, `zip`
- Writable `storage/packages/`, `storage/cache/`, and `storage/logs/` directories

Install
-------

[](#install)

Recommended: start from the ready-to-run app skeleton.

```
composer create-project webshr/wp-update-server-app my-update-server
cd my-update-server
```

The app skeleton lives at [webshr/wp-update-server-app](https://github.com/webshr/wp-update-server-app). It includes the deployable project layout: `public/index.php`, root `wpus`, `config/`, `storage/`, and `.env.example`.

Create your environment file and configure the server:

```
cp .env.example .env
```

Edit `.env`, then add your packages in `config/packages.php`.

Validate the app:

```
php wpus config validate
php wpus package list
```

Point your web server document root to:

```
my-update-server/public

```

For local testing:

```
php -S localhost:8000 -t public public/index.php
```

Open:

```
http://localhost:8000/metadata/my-plugin

```

For installed clients, include their current version:

```
http://localhost:8000/metadata/my-plugin?installed_version=1.2.0

```

Library Usage
-------------

[](#library-usage)

If you are embedding this library into your own project instead of using the app skeleton, install it with Composer:

```
composer require webshr/wp-update-server
```

Copy the app stubs into your project root:

```
stubs/.env.example          -> .env
stubs/public/index.php      -> public/index.php
stubs/config/*              -> config/
stubs/storage/*             -> storage/
stubs/update-server.php     -> update-server.php

```

The copied stubs are bootable files. In particular, `stubs/config/packages.php` and `stubs/config/licenses.php` should become `config/packages.php` and `config/licenses.php`, not `*.example.php` files.

When using the library directly, the Composer binary is:

```
vendor/bin/wpus config validate
```

The `php wpus ...` command is provided by the app skeleton's root `wpus` file. If you want that command shape in a custom app, copy or create a root `wpus` launcher there.

Configuration
-------------

[](#configuration)

By default, the server reads configuration from the `config/` directory. The HTTP/server settings live in `config/server.php`, packages in `config/packages.php`, and licenses in `config/licenses.php`. `config/server.php` is required. `config/packages.php` and `config/licenses.php` are optional and default to empty arrays when they do not exist.

For custom wiring, copy `stubs/update-server.php` to a root-level `update-server.php` aggregate config and edit it. When present, `update-server.php` overrides the conventional `config/*.php` loading. A path passed with `--config` takes precedence over both.

Example `config/server.php`:

```
