WP Manifestindependent plugin directory
manifest / developer / remote-media-source

Remote Media Source

WordPress plugin — serve media from a remote WordPress source on local, dev, and staging environments

by 9ete · github.com/9ete/remote-media-source · website

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/9ete/remote-media-source/archive/refs/heads/main.zip

A WordPress plugin that lets local, dev, and staging environments serve media from a remote WordPress source — no file syncing required.

How it works

Install the plugin on every environment. Assign roles in Settings › Remote Media Source:

  • Source (production): generates a connection key, exposes an authenticated verification endpoint.
  • Consumer (local/dev/staging): stores the remote URL + key, rewrites all upload URLs to the source, and enforces a configurable upload policy.

Once a consumer verifies its connection, all media URLs point to the source. Browsers fetch files directly from production — nothing is stored locally.

Requirements

  • WordPress 6.0+
  • PHP 8.1+
  • Both source and consumer must have this plugin installed

Setup

  1. Source site (production): Settings › Remote Media Source → Role: Source → Generate Connection Key → copy the key.
  2. Consumer site (local/dev/stg): Settings › Remote Media Source → Role: Consumer → enter source URL + key → Test Connection.

Development

git clone <repo>
cd remote-media-source
composer install
composer install-hooks
npm install   # Cypress e2e tooling
Command Purpose
composer lint PHPCS check
composer lint:fix PHPCBF auto-fix
composer test PHPUnit unit tests
composer test:e2e Cypress e2e suite (needs the test-envs Lando sites running)
composer build-zip Build distribution zip
composer plugin-check WP.org Plugin Check against the dist build (needs the rms-source Lando site)
composer wp-repo-screenshots Regenerate the wp.org screenshots
composer check Full release gate: lint + unit + e2e + plugin-check

Local end-to-end testing runs against three Lando WordPress sites (one source, two consumers) — see test-envs/README.md. WP.org listing assets (banner, icon) live in .wordpress-org/ with their HTML sources.

License

GPLv2 or later — see gpl-2.0.txt.