{"id":15508965,"url":"https://github.com/froger-me/wp-packages-update-server","last_synced_at":"2025-04-13T08:41:21.578Z","repository":{"id":32439166,"uuid":"133245697","full_name":"froger-me/wp-packages-update-server","owner":"froger-me","description":"WP Packages Update Server - Run Your Own Update Server for Plugins and Themes","archived":false,"fork":false,"pushed_at":"2024-08-30T22:26:53.000Z","size":1610,"stargazers_count":141,"open_issues_count":5,"forks_count":39,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-10-19T22:04:52.698Z","etag":null,"topics":["license-checking","update-server","wordpress-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/froger-me.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-13T14:43:15.000Z","updated_at":"2024-10-08T14:33:29.000Z","dependencies_parsed_at":"2024-01-16T03:59:35.250Z","dependency_job_id":"3b2b6095-c5f1-4fc0-bf8c-c8de11dc8067","html_url":"https://github.com/froger-me/wp-packages-update-server","commit_stats":{"total_commits":342,"total_committers":4,"mean_commits":85.5,"dds":0.02631578947368418,"last_synced_commit":"23e3b5b3df4d7cadca974f8120858ccc8c3598f2"},"previous_names":["froger-me/wp-packages-update-server"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froger-me%2Fwp-packages-update-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froger-me%2Fwp-packages-update-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froger-me%2Fwp-packages-update-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froger-me%2Fwp-packages-update-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/froger-me","download_url":"https://codeload.github.com/froger-me/wp-packages-update-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248686607,"owners_count":21145530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["license-checking","update-server","wordpress-plugin"],"created_at":"2024-10-02T09:40:47.769Z","updated_at":"2025-04-13T08:41:21.550Z","avatar_url":"https://github.com/froger-me.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"**This project has been deprecated in favor of [UpdatePulse Server](https://github.com/Anyape/updatepulse-server).**  \n**It is only maintained by the community via pull requests, and releases are published only based on community feedback. No new feature will be added and no more in-depth maintenance will be performed by the original author.**  \n**There is no formal upgrade path from WPPUS to UpdatePulse Server.**\n\n# WP Packages Update Server - Run your own update server\n\n* [WP Packages Update Server - Run your own update server](#wp-packages-update-server---run-your-own-update-server)\n\t* [Introduction](#introduction)\n\t\t* [Overview](#overview)\n\t\t* [Special Thanks](#special-thanks)\n\t\t* [Compatibility](#compatibility)\n\t\t* [Screenshots](#screenshots)\n\t\t\t* [Packages Overview](#packages-overview)\n\t\t\t* [Remote Sources](#remote-sources)\n\t\t\t* [Licenses](#licenses)\n\t\t\t* [API \\\u0026 Webhooks](#api--webhooks)\n\t\t\t* [Client - plugin screens](#client---plugin-screens)\n\t\t\t* [Client - theme screens](#client---theme-screens)\n\t\t\t* [Client - updates screen](#client---updates-screen)\n\t* [User Interface](#user-interface)\n\t\t* [Packages Overview](#packages-overview-1)\n\t\t* [Remote Sources](#remote-sources-1)\n\t\t* [Licenses](#licenses-1)\n\t\t* [API \\\u0026 Webhooks](#api--webhooks-1)\n\t* [Performances](#performances)\n\t\t* [Benchmark](#benchmark)\n\t\t* [Update API](#update-api)\n\t\t* [Public License API](#public-license-api)\n\t* [Help](#help)\n\t\t* [Provide updates with WP Packages Update Server - packages requirements](#provide-updates-with-wp-packages-update-server---packages-requirements)\n\t\t* [Requests optimisation](#requests-optimisation)\n\t\t* [More help...](#more-help)\n\n\nDeveloper documentation:\n- [Packages](https://github.com/froger-me/wp-packages-update-server/blob/main/integration/docs/packages.md)\n- [Licenses](https://github.com/froger-me/wp-packages-update-server/blob/main/integration/docs/licenses.md)\n- [Miscellaneous](https://github.com/froger-me/wp-packages-update-server/blob/main/integration/docs/misc.md)\n- [Generic Updates Integration](https://github.com/froger-me/wp-packages-update-server/blob/main/integration/docs/generic.md)\n\n## Introduction\n\nWP Packages Update Server allows developers to provide updates for plugins \u0026 themes not hosted on `wordpress.org` (if not compliant with the GPLv2 or later, for example), or for generic packages unrelated to WordPress altogether. It also allows to control the updates with license.\nPackage updates may be either uploaded directly, or hosted in a Remote Repository, public or private, with the latest version of packages stored either locally or in the Cloud. It supports Bitbucket, Github, Gitlab, and self-hosted installations of Gitlab for package updates ; S3 compatible service providers are supported for package storage.\n\n### Overview\n\nThis plugin adds the following major features to WordPress:\n\n* **Packages Overview:** manage package updates with a table showing Package Name, Version, Type, File Name, Size, Last Modified and License Status ; includes bulk operations to delete, download and change the license status, and the ability to delete all the packages. Upload updates from your local machine to WPPUS, or let the system to automatically download them to WPPUS from a Remote Repository. Store packages either locally, or in the Cloud with an S3 compatible service. Packages can also be managed through their own API.\n* **Remote Sources:** configure the Remote Repository Service of your choice (Bitbucket, Github, Gitlab, or a self-hosted installation of Gitlab) with secure credentials and a branch name where the updates are hosted ; choose to check for updates recurringly, or when receiveing a webhook notification. WPPUS acts as a middleman between your Remote Repository, your udpates storage (local or Cloud), and your clients.\n* **Licenses:** manage licenses with a table showing ID, License Key, Registered Email, Status, Package Type, Package Slug, Creation Date, and Expiry Date ; add and edit them with a form, or use the API for more control. Licenses prevent packages installed on client machines from being updated without a valid license. Licenses are generated automatically by default and the values are unguessable (it is recommended to keep the default). When checking the validity of licenses an extra license signature is also checked to prevent the use of a license on more than the configured allowed domains.\n* **Not limited to WordPress:** with a platform-agnostic API, updates can be served for any type of package, not just WordPress plugins \u0026 themes. Basic examples of integration with Node.js, PHP, bash, and Python are provided in the [documentation](https://github.com/froger-me/wp-packages-update-server/blob/main/integration/docs/generic.md).\n* **API \u0026 Webhooks:** Use the Package API to administer packages (browse, read, edit, add, delete), and request for expirable signed URLs of packages to allow secure downloads. Use the License API to administer licenses (browse, read, edit, add, delete) and check, activate or deactivate licenses. Fire Webhooks to notify any URL of your choice of key events affecting packages and licenses. \n\nTo connect their packages and WP Packages Update Server, developers can find integration examples in `wp-packages-update-server/integration`:\n* **Dummy Plugin:** a folder `dummy-plugin` with a simple, empty plugin that includes the necessary code in the `dummy-plugin.php` main plugin file and the necessary libraries in a `lib` folder.\n* **Dummy Theme:** a folder `dummy-theme` with a simple, empty child theme of Twenty Seventeen that includes the necessary code in the `functions.php` file and the necessary libraries in a `lib` folder.\n* **Dummy Generic:** a folder `dummy-generic` with a simple command line program written bash, Node.js, PHP, bash, and Python. Execute by calling `./dummy-generic.[js|php|sh|py]` from the command line. See `wppus-api.[js|php|sh|py]` for simple examples of the API calls.\n\nIn addition, requests to the various APIs are optimised with a customisable [Must Use Plugin](https://codex.wordpress.org/Must_Use_Plugins) automatically added upon install of WP Packages Update Server. The original file can be found in `wp-packages-update-server/optimisation/wppus-endpoint-optimizer.php`.  \n\n### Special Thanks\nA warm thank you to [Yahnis Elsts](https://github.com/YahnisElsts), the author of [Plugin Update Checker](https://github.com/YahnisElsts/plugin-update-checker) and [WP Update Server](https://github.com/YahnisElsts/wp-update-server) libraries, without whom the creation of this plugin would not have been possible.  \nAuthorisation to use these libraries freely provided relevant licenses are included has been graciously granted [here](https://github.com/YahnisElsts/wp-update-server/issues/37#issuecomment-386814776).\n\n### Compatibility\n\n* Tested with PHP 8.x - may work with PHP 7.x versions for the most part, but it is not guaranteed\n* WP Packages Update Server proper uses Plugin Update Checker Library 5.3 and WP Update Server Library 2.0.1\n* Integration examples for WordPress packages use Plugin Update Checker Library 5.3\n\n**Pull requests to solve any bugs, improve performance, and keep libraries up to date are welcome and highly encouraged.**  \n**Requests to debug or troubleshoot specific setups will not be addressed.**\n\n### Screenshots\n\nNote: the screenshots are updated regularly, but the actual interface may vary slightly.\n\n#### Packages Overview\n\n\u003cimg src=\"https://anyape.com/resources/wppus/screenshots/packages-overview.png\" alt=\"Packages Overview\" width=\"100%\"\u003e\n\n#### Remote Sources\n\n\u003cimg src=\"https://anyape.com/resources/wppus/screenshots/remote-sources.png\" alt=\"Remote Sources\" width=\"100%\"\u003e\n\n#### Licenses\n\n\u003cimg src=\"https://anyape.com/resources/wppus/screenshots/licenses.png\" alt=\"Licenses\" width=\"100%\"\u003e\n\n#### API \u0026 Webhooks\n\n\u003cimg src=\"https://anyape.com/resources/wppus/screenshots/api.png\" alt=\"API \u0026 Webhooks\" width=\"100%\"\u003e\n\n#### Client - plugin screens\n\n\u003cimg src=\"https://anyape.com/resources/wppus/screenshots/admin_plugins.png\" alt=\"Plugins\" width=\"100%\"\u003e\n\u003cimg src=\"https://anyape.com/resources/wppus/screenshots/admin_plugins-2.png\" alt=\"Plugin Details\" width=\"100%\"\u003e\n\n#### Client - theme screens\n\n\u003cimg src=\"https://anyape.com/resources/wppus/screenshots/admin_themes.png\" alt=\"Themes\" width=\"100%\"\u003e\n\u003cimg src=\"https://anyape.com/resources/wppus/screenshots/admin_themes-2.png\" alt=\"Theme Details\" width=\"100%\"\u003e\n\u003cimg src=\"https://anyape.com/resources/wppus/screenshots/admin_themes-3.png\" alt=\"Theme License\" width=\"100%\"\u003e\n\n#### Client - updates screen\n\n\u003cimg src=\"https://anyape.com/resources/wppus/screenshots/admin_update-core.png\" alt=\"Updates\" width=\"100%\"\u003e\n\n## User Interface\n\nAside from a help page, WP Packages Update Server provides a user interface to manage packages, manage licenses, manage Remote Repository connection, and to configure API \u0026 Webhooks.\n\n### Packages Overview\n\nThis tab allows administrators to:\n- View the list of packages currently available in WP Packages Update Server, with Package Name, Version, Type (Plugin or Theme), File Name, Size, Last Modified and License Status (if enabled)\n- Download a package\n- Toggle between \"Require License\" and \"Do not Require License\" for a package when \"Enable Package Licenses\" is checked under the \"Licenses\" tab\n- Delete a package\n- Apply bulk actions on the list of packages (download, delete, change license status of the package if licenses are enabled)\n- Add a package (either by uploading it directly, or by priming it by pulling it from a configured Remote Repository)\n- Configure and test a Cloud Storage service\n- Configure other packages-related settings - file upload, cache and logs max sizes.\n\nThe following settings are available:\n\nName                                | Type     | Description\n----------------------------------- |:--------:| ------------------------------------------------------------------------------------------------------------------------------\nUse Cloud Storage                   | checkbox | Check to use a Cloud Storage Service - S3 Compatible.\u003cbr\u003eIf it does not exist, a virtual folder `wppus-packages` will be created in the Storage Unit chosen for package storage.\nCloud Storage Access Key            | text     | The Access Key provided by the Cloud Storage service provider.\nCloud Storage Secret Key            | text     | The Secret Key provided by the Cloud Storage service provider.\nCloud Storage Endpoint              | text     | The domain (without `http://` or `https://`) of the endpoint for the Cloud Storage Service.\nCloud Storage Unit                  | text     | Usually known as a \"bucket\" or a \"container\" depending on the Cloud Storage service provider.\nCloud Storage Region                | text     | The region of the Cloud Storage Unit, as indicated by the Cloud Storage service provider.\nArchive max size (in MB)            | number   | Maximum file size when uploading or downloading packages.\nCache max size (in MB)              | number   | Maximum size in MB for the `wp-content/plugins/wp-packages-update-server/cache` directory. If the size of the directory grows larger, its content will be deleted at next cron run (checked hourly). The size indicated in the \"Force Clean\" button is the real current size.\nLogs max size (in MB)               | number   | Maximum size in MB for the `wp-content/plugins/wp-packages-update-server/logs` directory. If the size of the directory grows larger, its content will be deleted at next cron run (checked hourly). The size indicated in the \"Force Clean\" button is the real current size.\n\nA button is available to send a test request to the Cloud Storage Service. The request checks whether the provider is reachable and if the Storage Unit exists and is writable.  \nIf it does not exist during the test, a virtual folder `wppus-packages` will be created in the Storage Unit chosen for package storage.  \n\n### Remote Sources\n\nThis tab allows administrators to configure how Remote Sources are handled with the following settings:\n\nName                                  | Type      | Description\n------------------------------------- |:---------:| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\nUse Remote Repository Service         | checkbox  | Enables this server to download packages from a Remote Repository before delivering updates.\u003cbr/\u003eSupports Bitbucket, Github and Gitlab.\u003cbr/\u003eIf left unchecked, zip packages need to be manually uploaded to `wp-content/plugins/wp-packages-update-server/packages`.\u003cbr/\u003e**It affects all the packages delivered by this installation of WP Packages Update Server if they have a corresponding repository in the Remote Repository Service.**\u003cbr/\u003e**Settings of the \"Packages remote source\" section will be saved only if this option is checked.**\nRemote Repository Service URL         | text      | The URL of the Remote Repository Service where packages are hosted.\u003cbr/\u003eMust follow the following pattern: `https://repository-service.tld/username` where `https://repository-service.tld` may be a self-hosted instance of Gitlab.\u003cbr/\u003eEach package repository URL must follow the following pattern: `https://repository-service.tld/username/package-slug/` ; the package files must be located at the root of the repository, and in the case of plugins the main plugin file must follow the pattern `package-slug.php`.\nSelf-hosted Remote Repository Service | checkbox  | Check this only if the Remote Repository Service is a self-hosted instance of Gitlab.\nPackages branch name                  | text      | The branch to download when getting remote packages from the Remote Repository Service.\nRemote Repository Service credentials | text      | Credentials for non-publicly accessible repositories.\u003cbr/\u003eIn the case of Github and Gitlab, an access token (`token`).\u003cbr/\u003eIn the case of Bitbucket, the Consumer key and secret separated by a pipe (`consumer_key\\|consumer_secret`). IMPORTANT: when creating the consumer, \"This is a private consumer\" must be checked.\t\nUse Webhooks                          | checkbox  | Check so that each repository of the Remote Repository Service calls a Webhook when updates are pushed.\u003cbr\u003eWhen checked, WP Packages Update Server will not regularly poll repositories for package version changes, but relies on events sent by the repositories to schedule a package download.\u003cbr\u003eWebhook URL: `https://domain.tld/wppus-webhook/package-type/package-slug` - where `package-type` is the package type (`plugin`, `theme`, or `generic`) and `package-slug` is the slug of the package that needs updates.\u003cbr\u003eNote that WP Packages Update Server does not rely on the content of the payload to schedule a package download, so any type of event can be used to trigger the Webhook.\nRemote Download Delay                 | number    | Delay in minutes after which WP Packages Update Server will poll the Remote Repository for package updates when the Webhook has been called.\u003cbr\u003eLeave at `0` to schedule a package update during the cron run happening immediately after the Webhook notification was received.\nRemote Repository Webhook Secret      | text      | Ideally a random string, the secret string included in the request by the repository service when calling the Webhook.\u003cbr\u003e**WARNING: Changing this value will invalidate all the existing Webhooks set up on all package repositories.**\u003cbr\u003eAfter changing this setting, make sure to update the Webhooks secrets in the repository service.\nRemote update check frequency         | select    | Only available in case Webhooks are not used - How often WP Packages Update Server will poll each Remote Repository for package updates - checking too often may slow down the server (recommended \"Once Daily\").\n\nA button is available to send a test request to the Remote Repository Service. The request checks whether the service is reachable and if the request can be authenticated.  \nTests via this button are not supported for Bitbucket ; if Bitbucket is used, testing should be done after saving the settings and trying to prime a package in the Packages Overview tab.  \n\nIn case Webhooks are not used, the following actions are available to forcefully alter the packages schedules (maintenance, tests, etc):\n- Clear all the scheduled remote updates\n- Reschedule all the remote updates\n\n### Licenses\n\nThis tab allows administrators to:\n- Entirely enable/disable package licenses. **It affects all the packages with a \"Requires License\" license status delivered by WP Packages Update Server.**\n- View the list of licenses currently stored by WP Packages Update Server, with License Key, Registered Email, Status, Package Type (Plugin or Theme), Package Slug, Creation Date, Expiry Date, ID\n- Add a license\n- Edit a license\n- Delete a license\n- Apply bulk actions on the list of licenses (delete, change license status)\n\n### API \u0026 Webhooks\n\nThis tab allows administrators to configure:\n- the Package API to administer packages (browse, read, edit, add, delete), request for expirable signed URLs of packages to allow secure downloads, and requests for tokens \u0026 true nonces.\n- the License API to administer licenses (browse, read, edit, add, delete) and check, activate or deactivate licenses.\n- the list of URLs notified via Webhooks, with the following available events:\n\t-  Package events `(package)`\n\t\t- Package added or updated `(package_update)`\n\t\t- Package deleted `(package_delete)`\n\t\t- Package downloaded via a signed URL `(package_download)`\n\t- License events `(license)`\n\t\t- License activated `(license_activate)`\n\t\t- License deactivated `(license_deactivate)`\n\t\t- License added `(license_add)`\n\t\t- License edited `(license_edit)`\n\t\t- License deleted `(license_delete)`\n\t\t- License becomes required for a package `(license_require)`\n\t\t- License becomes not required a for package `(license_unrequire)`\n\nAvailable settings:\n\nName                                     | Description\n---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\nPrivate API Keys (Package API)           | Multiple values ; creating a key required a \"Package Key ID\" used to identify the package key.\u003cbr\u003eUsed to sign requests to obtain tokens for package administration operations (browse, read, edit, add, delete) and obtaining signed URLs of package.\u003cbr\u003eThe Package Key ID must contain only numbers, letters, `-` and `_`.\u003cbr\u003e**WARNING: Keep these keys secret, do not share any of them with customers!**\nIP Whitelist (Package API)               | Multiple values.\u003cbr\u003eList of IP addresses and/or CIDRs of remote sites authorized to use the Package Private API (one IP address or CIDR per line).\u003cbr\u003eLeave blank to accept any IP address (not recommended).\nPrivate API Keys (License API)\t         | Multiple values ; creating a key required a \"License Key ID\" used to identify the package key.\u003cbr\u003eUsed to sign requests to obtain tokens for license administration operations (browse, read, edit, add, delete).\u003cbr\u003eThe License Key ID must contain only numbers, letters, `-` and `_`.\u003cbr\u003e**WARNING: Keep these keys secret, do not share any of them with customers!**\nIP Whitelist (License API)               | Multiple values.\u003cbr\u003eList of IP addresses and/or CIDRs of remote sites authorized to use the License Private API (one IP address or CIDR per line).\u003cbr\u003eLeave blank to accept any IP address (not recommended).\nWebhook                                  | Multiple values ; creating a Webhook requires a \"Payload URL\", a `secret-key`, and a list of events.\u003cbr\u003eWebhooks are event notifications sent to arbitrary URLs at next cronjob (1 min. latest after the event occured, depending on the server configuration) with a payload of data for third party services integration.\u003cbr\u003eTo allow the recipients to authenticate the notifications, the payload is signed with a `secret-key` secret key using `sha1` algorithm and `sha256` algorithm ; the resulting hashes are made available in the `X-WPPUS-Signature` and `X-WPPUS-Signature-256` headers respectively.\u003cbr\u003e**The `secret-key` must be at least 16 characters long, ideally a random string.**\u003cbr\u003eThe payload is sent in JSON format via a `POST` request.\u003cbr\u003e**WARNING: Only add URLs you trust!**\n\n## Performances\n\nPerformance can be evaluated using the script `tests.php` located at the plugin's root. It is included only if the WordPress constants `WP_DEBUG` and `SAVEQUERIES` are truthy. Developers can edit the script freely by uncommenting relevant parts to  activate the desired tests.  \n\nThe performance insights below have been gathered on a cheap shared hosting server (less than $10 per month) with 256 MB of RAM, without any function hooked to WP Packages Update Server actions or filters, no Webhook, and with the MU Plugin endpoint optimizer active. Your Mileage May Vary depending on your server configuration and various optimisations you may add to your WordPress installation.  \n\nThe general conclusion is that calls to the APIs are lighter and faster than loading the vaste majority of WordPress homepages (which is the page likely to be visited the most on any website) and lighter than a WordPress ajax call (extra optimisations and aggressive caching not considered).\n\n### Benchmark\n\nPerformances loading the frontpage of a fresh WordPress installation with `dummy-theme`, an empty static frontpage and no active plugin:  \n\n```\n--- Start load tests ---\nTime elapsed: 0.129\nServer memory used: 16.02 M / 256M\nTotal number of queries: 13\nTotal number of scripts: 194\n--- End load tests ---\n```\n\n### Update API\n\nPerformances when a client is checking for updates (no license):\n\n```\n--- Start load tests ---\nTime elapsed: 0.103\nTotal server memory used: 16.06 M / 256M\nTotal number of queries: 1\nTotal number of scripts: 173\nServer memory used to run the plugin: 1.76 M / 256M\nNumber of queries executed by the plugin: 0\nNumber of included/required scripts by the plugin: 30\n--- End load tests ---\n```\n\nPerformances when a client is downloading an update (YMMV: downloading `dummy-plugin` - no license):\n\n```\n--- Start load tests ---\nTime elapsed: 0.111\nTotal server memory used: 16.06 M / 256M\nTotal number of queries: 1\nTotal number of scripts: 173\nServer memory used to run the plugin: 1.8 M / 256M\nNumber of queries executed by the plugin: 0\nNumber of included/required scripts by the plugin: 30\n--- End load tests ---\n```\n\nPerformances when a client is checking for updates (with license):\n\n```\n--- Start load tests ---\nTime elapsed: 0.112\nTotal server memory used: 16.06 M / 256M\nTotal number of queries: 2\nTotal number of scripts: 174\nServer memory used to run the plugin: 1.76 M / 256M\nNumber of queries executed by the plugin: 1\nNumber of included/required scripts by the plugin: 31\n--- End load tests ---\n```\n\nPerformances when a client is downloading an update (YMMV: downloading `dummy-plugin` - with license):\n\n```\n--- Start load tests ---\nTime elapsed: 0.114\nTotal server memory used: 16.06 M / 256M\nTotal number of queries: 2\nTotal number of scripts: 174\nServer memory used to run the plugin: 1.76 M / 256M\nNumber of queries executed by the plugin: 1\nNumber of included/required scripts by the plugin: 31\n--- End load tests ---\n```\n\n### Public License API\n\nPerformances when a client is activating/deactivating a bogus license key:\n```\n--- Start load tests ---\nTime elapsed: 0.108\nTotal server memory used: 15.24 M / 256M\nTotal number of queries: 2\nTotal number of scripts: 154\nServer memory used to run the plugin: 966.85 K / 256M\nNumber of queries executed by the plugin: 1\nNumber of included/required scripts by the plugin: 11\n--- End load tests ---\n```\n\nPerformances when a client is activating a license key:\n```\n--- Start load tests ---\nTime elapsed: 0.109\nTotal server memory used: 15.24 M / 256M\nTotal number of queries: 6\nTotal number of scripts: 154\nServer memory used to run the plugin: 966.85 K / 256M\nNumber of queries executed by the plugin: 5\nNumber of included/required scripts by the plugin: 11\n--- End load tests ---\n```\n\nPerformances when a client is deactivating a license key:\n```\n--- Start load tests ---\nTime elapsed: 0.098\nTotal server memory used: 15.24 M / 256M\nTotal number of queries: 6\nTotal number of scripts: 154\nServer memory used to run the plugin: 966.85 K / 256M\nNumber of queries executed by the plugin: 5\nNumber of included/required scripts by the plugin: 11\n--- End load tests ---\n```\n\n## Help\n\nThe following can also be found under the \"Help\" tab of the WP Packages Update Server admin page.  \n\n### Provide updates with WP Packages Update Server - packages requirements \n\nTo link your packages to WP Packages Update Server, and optionally to prevent webmasters from getting updates of your ppackages without a license, your packages need to include some extra code.  \n\nFor plugins, and themes, it is fairly straightforward:\n- Add a `lib` directory with the `plugin-update-checker` and `wp-update-checker` libraries to the root of the package (provided in `dummy-[plugin|theme]` ; `wp-update-checker` can be customized as you see fit, but `plugin-update-checker` should be left untouched).\n- Add the following code to the main plugin file (for plugins) or in the `functions.php` file (for themes) :\n```php\n/** Enable updates - note the  `$prefix_updater` variable: change `prefix` to a unique string for your package **/\nrequire_once __DIR__ . '/lib/wp-package-updater/class-wp-package-updater.php';\n\n$prefix_updater = new WP_Package_Updater(\n\twp_normalize_path( __FILE__ ),\n\t0 === strpos( __DIR__, WP_PLUGIN_DIR ) ? wp_normalize_path( __DIR__ ) : get_stylesheet_directory()\n);\n```\n- Add a `wppus.json` file at the root of the package with the following content - change the value of `\"server\"` to your own (required), and select a value for `\"requireLicense\"` (optional):\n```json\n{\n   \"server\": \"https://server.domain.tld/\",\n   \"requireLicense\": true|false\n}\n```\n- Connect WPPUS with your repository and prime your package, or manually upload your package to WPPUS.\n\nFor generic packages, the steps involved entirely depend on the language used to write the package and the update process of the target platform.  \nYou may refer to the documentation found [here](https://github.com/froger-me/wp-packages-update-server/blob/main/integration/docs/generic.md).\n___\n\nSee `wp-content/plugins/wp-packages-update-server/integration/dummy-plugin` for an example of plugin, and  `wp-content/plugins/wp-packages-update-server/integration/dummy-theme` for an example of theme. They are fully functionnal and can be used to test all the features of the server with a test client installation of WordPress.  \n\nSee `wp-content/plugins/wp-packages-update-server/integration/dummy-generic` for examples of a generic package written in Bash, NodeJS, PHP with Curl, and Python. The API calls made by generic packages to the license API and Update API are the same as the WordPress packages. Unlike the upgrade library provided with plugins \u0026 themes, the code found in `wppwus-api.[sh|php|js|py]` files is **NOT ready for production environment and MUST be adapted**.\n\nUnless \"Use Remote Repository Service\" is checked in \"Remote Sources\", you need to manually upload the packages zip archives (and subsequent updates) in `wp-content/wppus/packages` or `CloudStorageUnit://wppus-packages/`.  A package needs to a valid generic package, or a valid WordPress plugin or theme package, and in the case of a plugin the main plugin file must have the same name as the zip archive. For example, the main plugin file in `package-slug.zip` would be `package-slug.php`.  \n\n### Requests optimisation\n\nWhen the remote clients where your plugins and themes are installed send a request to check for updates or download a package, this server's WordPress installation is loaded, with its own plugins and themes. This is not optimised if left untouched because unnecessary action and filter hooks that execute before `parse_request` action hook are also triggered, even though the request is not designed to produce any on-screen output or further computation.\n\nTo solve this, the file `wp-content/plugins/wp-packages-update-server/optimisation/wppus-endpoint-optimiser.php` is automatically copied to `wp-content/mu-plugins/wppus-endpoint-optimiser.php`. This effectively creates a Must Use Plugin running before everything else and preventing themes and other plugins from being executed when an update request or a license API request is received by WP Packages Update Server.\n\nYou may edit the variable `$wppus_always_active_plugins` of the MU Plugin file to allow some plugins to run anyway, or set the `$wppus_bypass_themes` to `false` to allow `functions.php` files to be included, for example to hook into WP Plugin Server actions and filters. If in use and a new version is available, the MU Plugin will be backed-up to `wp-content/mu-plugins/wppus-endpoint-optimiser.php.backup` when updating WP Packages Update Server and will automatically be replaced with its new version. If necessary, make sure to report any previous customization from the backup to the new file.\n\nThe MU Plugin also provides the global variables `$wppus_doing_update_api_request` and `$wppus_doing_license_api_request` that can be tested when adding hooks and filters would you choose to keep some plugins active with `$wppus_always_active_plugins` or keep `functions.php` from themes included with `$wppus_bypass_themes` set to `false`.\n\n### More help...\n\nFor more help on how to use WP Packages Update Server, please open an issue - bugfixes are welcome via pull requests, detailed bug reports with accurate pointers as to where and how they occur in the code will be addressed in a timely manner, and a fee will apply for any other request if they are addressed.  \nIf and only if you found a security issue, please contact `wppus-help@anyape.com` with full details for responsible disclosure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffroger-me%2Fwp-packages-update-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffroger-me%2Fwp-packages-update-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffroger-me%2Fwp-packages-update-server/lists"}