plugin-icon

Divine Apparitions Uploads Proxy

제작자: philltran·
Proxy missing media to a production origin so staging and local environments don't need a full copy of the uploads directory.
버전
0.11.1
최근 업데이트일
Jul 1, 2026

When you pull a production database into a staging or local environment, every media URL points at a file you didn’t copy — pages render with broken images and dead file links. Divine Apparitions Uploads Proxy intercepts the request for any missing uploads file and resolves it against a configured production Origin, so pages render with real media without syncing the entire uploads directory.

Because it works at the request level — hooking template_redirect when the web server routes a missing file to index.php (nginx try_files, used by DDEV, Lando, and Pantheon) — it catches every missing upload, including images embedded directly in post content, size derivatives, and srcset candidates, not just the URLs WordPress generates for attachments.

It resolves a missing file in one of two modes:

  • Download mode (default): streams the file from the Origin, saves it into the local uploads directory, and serves it. Every later request is served by the web server, so your local site accumulates exactly the subset of media your tests actually touch — never the whole uploads folder.
  • Hotlink mode (opt-in): issues a temporary redirect to the file on the Origin, writing nothing locally.

Configuration lives in wp-config constants / environment variables (with a database-option fallback), so it survives every database pull and configures itself hands-free in CI. The plugin is inert on production and stays off until an Origin is configured.

Features:

  • Request-level interception — resolves content-embedded images, derivatives, and srcset, not just attachment URLs.
  • Download or Hotlink mode, chosen per environment.
  • Optional Basic Auth for fetching from a locked Test/Dev Origin.
  • Negative cache so a file genuinely missing on the Origin stops re-hitting it, while transient errors (5xx/timeout) retry on the next request.
  • Write hardening: executable file types are refused and paths are contained to the uploads directory.
  • Diagnostics settings page showing the effective config and its source, the counters, and a “test Origin connection” button.
  • wp uploads-proxy WP-CLI command (status / clear-cache) for scripting setup and reset in CI.
  • Inert on production; off until an Origin is configured.
무료유료 요금제에서
설치하면 WordPress.com 서비스 약관서드파티 플러그인 약관에 동의하게 됩니다.
테스트된 버전
WordPress 7.0
이 플러그인은 다운로드할 수 있으며 에서 사용할 수 있습니다.