WP Manifestindependent plugin directory
manifest / media / cloud-media-offload

Cloud Media Offload

Offload WordPress media to cloud storage (Cloudflare R2, AWS S3, DigitalOcean Spaces, Backblaze B2, Wasabi, Bunny.net, Linode). Serves files via CDN, saves server disk space.

by Kushal Dhola · github.com/kushaldhola/cloud-media-offload · 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/kushaldhola/cloud-media-offload/archive/refs/heads/main.zip

Readme

Cloud Media Offload

A universal WordPress plugin that offloads your media library to cloud storage and serves files via CDN. Supports 7 major cloud storage providers with a clean, provider-agnostic architecture.

Author: Kushal Dhola
Version: 1.0.0
License: GPL-2.0-or-later
Requires: WordPress 5.8+ / PHP 7.4+


✨ Features

Multi-Provider Support

Provider Type Key Advantage
Cloudflare R2 S3-compatible Zero egress fees
Amazon S3 S3-native Global reliability
DigitalOcean Spaces S3-compatible Built-in CDN
Backblaze B2 S3-compatible Ultra-cheap storage
Wasabi S3-compatible No egress fees
Bunny.net Storage REST API Fastest CDN
Linode Object Storage S3-compatible Akamai-backed

Core Capabilities

  • Auto-offload on upload — Original files + all thumbnail sizes are uploaded immediately.
  • CDN URL rewriting — Rewrites wp_get_attachment_url, srcset, and post content URLs.
  • Protocol-safe rewriting — Handles both http:// and https:// variants of your uploads URL.
  • Bulk offload / restore — One-click tools with real-time progress and error logging.
  • Smart cleanup — Optional auto-queuing of orphaned product images with a configurable grace period.
  • Unattached scanner — Finds images not used by any post, product, page, or vendor profile.
  • Local file removal — Optionally delete local copies after offloading to save disk space.
  • No SDK bloat — Lightweight AWS Signature V4 signer using WordPress's wp_remote_request.

⚙️ Installation

  1. Upload the cloud-media-offload/ folder to /wp-content/plugins/.
  2. Activate Cloud Media Offload in WordPress Admin → Plugins.
  3. Navigate to Settings → Cloud Offload.
  4. Select your storage provider.
  5. Enter your credentials and bucket name.
  6. Set your Public URL / CDN Domain (e.g., https://cdn.yoursite.com).
  7. Click Save Settings, then Test Connection.

🔒 Security & Standards Compliance

  • All credentials stored in the WordPress wp_options table.
  • Nonce-protected and capability-checked (manage_options).
  • Input sanitized with sanitize_text_field() and esc_url_raw().
  • Outputs properly escaped.
  • Uses wp_delete_file() instead of raw unlink().

📄 License

This plugin is licensed under the GPL-2.0-or-later.

Author: Kushal Dhola

Read the full README on GitHub →