WP Manifestindependent plugin directory
manifest / updates / repo-man

Repo Man

A minimal WordPress plug-in to manage syncing other WordPress plug-ins through GitHub. Intended for quick testing of code directly from GitHub on live WordPress installs hosted anywhere.

by pixeldrift · github.com/pixeldrift/repo-man

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/pixeldrift/repo-man/archive/refs/heads/main.zip

Readme

Repo Man

A quick, low-friction way to deploy and test Wordpress plugins on a live server. Repo Man allows you to manually sync your development files from a GitHub repo direclty onto the site without any server-level git or SSH access required.

This tool is essentially a directory swap, not a real symlink. True remote filesystem mounting isn't possible over HTTP/PHP, but the goal is to make the code feel like it is linked to its GitHub repo rather than just being a one-time local import. In practice, it does function a lot like having a remote folder hooked directly into the Wordpress plugins directory.

Admin UI

wp-admin → Repo Man has three sections:

  1. How it works — a short recap of the flow below.
  2. GitHub Connection — one global personal access token used for every sync target (needed for private repos).
  3. Synced Plugins — a table of plugin repos you're managing, with a prominent Add Linked Plugin button next to the page title (it's the first thing you want on a fresh install). Each row shows the plugin name, a link to its GitHub repo, a link to it in the core Plugins list, its installed version, and when it was last synced — plus an Update available badge if GitHub has moved ahead of what's live. Per-row Sync now, Disable/Enable, and Rollback buttons, and Disable All, Roll Back All, Update All apply the same actions across every synced plugin at once.

Plugins managed by Repo Man are also flagged on the core Plugins list page itself: a "🔄 Synced via Repo Man" line under the plugin's description, and a Check for update & sync action link alongside Activate/Deactivate.

Update checks

Repo Man periodically checks GitHub in the background to see if a linked plugin's branch has moved. By default this only flags an Update available badge — it never syncs anything without explicit action by the user.

Each lined repo will have its status polled on a decaying schedule: 1 minute → 5 → 10 → 30 → 1 hour → 1 day → 1 week, resetting back to 1 minute whenever a change is found, or right after you manually perform a sync or rollback (signalling active development). Checks happen two ways:

  • On page load, whenever you have wp-admin → Repo Man open. This aids in fast iteration and tweaking when you're mid-session and care about quick feedback.
  • An hourly WP-Cron sweep as a background safety net for the slower tiers. Since WP-Cron is only fires on site traffic and can't reliably hit sub-hour intervals on its own.

Auto-sync (opt-in, off by default)

Each linked plugin's edit page has an Auto-sync checkbox. When enabled, any detected updates will be deployed immediately instead of just showing a badge. This uses the same polling pipeline above.

⚠️ This is dangerous on a live site. There is no review step between a GitHub push and that code going live on your site. A broken commit can take the site down and losing access to the Wordpress admin! Without server access, recovery means needing to sign in to your webhost's file manager to rename the plugin folder. Repo Man always keeps one backup for this exact reason. Only enable this feature on a testing/staging site, never on a public-facing one. If an auto-sync fails, the error is recorded and shown as a badge (last_auto_sync_error).

How a sync works

  1. Resolves the branch to its current commit SHA via the GitHub API.
  2. Downloads the zip for that exact SHA (/repos/{owner}/{repo}/zipball/{sha}) — not the branch name, so a push landing between steps 1 and 2 can't result in deploying (and recording) a different commit than the one just resolved.
  3. Extracts it to a temp directory under wp-content/uploads/repo-man-tmp/.
  4. Moves the current live plugin directory aside as a backup (previous backup, if any, is discarded first — only one is kept).
  5. Moves the extracted directory into wp-content/plugins/{slug}.
  6. Records the synced commit SHA as the "last synced" version, shown in the admin UI.

If a sync goes wrong, Rollback swaps the last backup back into place.

All actions are manual, admin-only (manage_options), and nonce-protected — there is no public webhook endpoint.

Notes

  • No delta updates: each sync pulls the full repo. Fine for small plugins; not intended for huge repos.
  • One shared GitHub token for all targets, stored in the repo_man_settings option. Use a fine-grained PAT scoped to Contents: Read-only on the repos you sync.

Read the full README on GitHub →