BASIC

Create Plugin Update

Every plugin or theme you distribute is a Download on your Hoster site. This page walks through creating a Download, adding the generated updater files to your product, and shipping new versions.

Step 1: Create a Download

  1. Go to Downloads → Add New Download.
  2. Enter the product name as the title.
  3. Check the slug (the URL of the Download): client sites ask for updates by this slug. If you rename the slug later, clients that still use the old one keep getting answers.
  4. Use the post content for your product page, if you show Downloads on the front end.

Downloads menu

The Download Details box below the editor has three tabs: Changelog, Description and Installation. Client sites show them in the "View details" window of your plugin. New Downloads start with example text in each tab; replace it.

Step 2: Fill in the Download sidebar

The right column of the Download Details box holds the product settings.

Download details

  • Downloads — how many times the package was served (button clicks and client updates).
  • Licensed — turn on when customers need a licence to download updates. See License on Hosted Plugin.
  • Select download type — Plugin or Theme.
  • Child Theme and Parent Theme (themes only) — for a child theme, enter the parent theme's folder name, for example twentytwentyfour. Client sites skip the update when that parent theme isn't installed.
  • Download URL — the package zip, see Step 4 below.
  • Version — the version you are distributing, for example 1.2.0. It must match the Version: header inside the zip.
  • Upgrade notice — optional plain text (300 characters max), shown under the update on client sites, for example "Requires PHP 8.1".
  • GitHub Repository — take the version and package from GitHub releases, see GitHub.
  • Banners and Icons (plugins) or Screenshot (themes, the Screenshot URL field) — images for the "View details" window and the update screens. See Plugin Assets.
  • WordPress — Requires Version, Tested Version and Minimum PHP Version. Client sites only offer the update when their WordPress and PHP versions meet these.
  • Author — Name, URL and WordPress Profile, shown in the "View details" window.

Add Download Tags in the editor's settings sidebar, if you use them to group your products.

Click Publish. Client sites only get updates for published Downloads.

Step 3: Add the Hoster files to your product

Go to Downloads → Resources and choose the Download. The newest Download is selected when the screen opens.

Resources screen

Hoster generates the files with names and constants for this product. Each code block has buttons to copy it or download it as a file.

  • Main plugin File (plugins) — the main plugin file with its header. It defines one constant and loads inc/hoster.php.
  • Main theme Files (themes) — the style.css header and a functions.php that loads inc/hoster.php. A child theme loads the file from its own folder.
  • hoster.php (on the same tab) — everything Hoster-specific: the product constants, the update URL and the updater call. If you ever move Hoster to another domain, this is the only file to replace.
  • Updater — inc/update.php (Updater Version 2.1.0) and, for Downloads not linked to GitHub, a Release API example.
  • GitHub Release — .gitignore, .distignore and .github/workflows/release.yml, see GitHub.
  • License (licensed Downloads only) — inc/hoster-license-handler.php and example code to activate licences.

A plugin ends up like this:

my-plugin/
├── my-plugin.php
├── inc/
│   ├── hoster.php
│   ├── update.php
│   └── hoster-license-handler.php   (licensed products only)
├── .github/
│   └── workflows/
│       └── release.yml              (GitHub releases only)
├── .distignore
└── .gitignore

A theme looks the same, with style.css and functions.php instead of the main plugin file:

my-theme/
├── style.css
├── functions.php
└── inc/
    ├── hoster.php
    └── update.php

The constants use a prefix made from the Download's slug: my-plugin becomes MYPLUGIN. inc/hoster.php defines MYPLUGIN_DIR, MYPLUGIN_BASE, MYPLUGIN_PATH and MYPLUGIN_VER (unless your code defines them first), plus MYPLUGIN_CACHE_KEY and MYPLUGIN_UPDATE_URL. The update URL points at your site:

https://your-site.com/wp-json/hoster/v1/update/my-plugin
Tip
Build the first zip with these files and install it on a test site. That copy then receives every update you publish.

Step 4: Ship a new version

First change the Version: header in your plugin file (or style.css) and build the zip. Then publish it in one of these ways.

Media Library file or URL

  1. Open the Download.
  2. Click the cloud button next to Download URL (Choose from Media Library) and pick the zip, or paste a URL to the zip.
  3. Enter the new Version and add the release to the Changelog tab.
  4. Click Update.

When the zip is in this site's Media Library, Hoster copies it into private storage on save. The sidebar then says "Served from private storage; the Media Library file can be deleted." Delete it: until you do, the Media Library file is public at its own URL. A URL on another server is not copied: Hoster fetches the file and passes it through when a client downloads it.

Upload new version

  1. Open the Download.
  2. Click the upload button next to Download URL (Upload new version) and choose the zip.

Hoster stores the zip straight in private storage, never in the Media Library. It reads the version from the Version: header of the main plugin file (or the theme's style.css) in the zip and saves it at once. The new version is live without clicking Update. Download URL then shows "Private upload: my-plugin.zip"; Use a URL instead switches back to a URL.

The zip can't be larger than your server's upload limit. Add the changelog entry and click Update as usual. This button is not available for Downloads linked to GitHub.

GitHub releases

Push a version tag and the generated workflow builds the zip and publishes a GitHub release. Hoster picks it up when you save the Download, or on its own with the webhook. See GitHub.

Release API

Publish the version with one request from CI, a deploy script or a terminal. See Release API.

Step 5: What your customers see

  • The update appears on Dashboard → Updates and on the Plugins (or Themes) screen, like any other update.
  • View details shows your Description, Installation and Changelog tabs, banners and icons.
  • The Upgrade notice is shown under the update.
  • For a licensed product without a valid licence for that site, the update is listed but can't be installed, and the reason is shown instead, for example "Your license is not activated for this site."
  • Each plugin gets a Check for updates link in its row on the Plugins screen. Themes get a notice with a Check for updates link on the Themes screen. The link clears the cached answer, so the next check asks your site again.
  • Updates also show up for WP-CLI (wp plugin update, wp theme update), WP-Cron and automatic updates.

Client sites cache your site's answer for 12 hours. When a licensed product's licence isn't valid (missing, expired or not activated for the site), they cache it for 15 minutes only, so a renewed or newly activated licence shows up soon. When your site can't be reached, they try again after an hour.