Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/kushaldhola/cloud-media-offload/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
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://andhttps://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
- Upload the
cloud-media-offload/folder to/wp-content/plugins/. - Activate Cloud Media Offload in WordPress Admin → Plugins.
- Navigate to Settings → Cloud Offload.
- Select your storage provider.
- Enter your credentials and bucket name.
- Set your Public URL / CDN Domain (e.g.,
https://cdn.yoursite.com). - Click Save Settings, then Test Connection.
🔒 Security & Standards Compliance
- All credentials stored in the WordPress
wp_optionstable. - Nonce-protected and capability-checked (
manage_options). - Input sanitized with
sanitize_text_field()andesc_url_raw(). - Outputs properly escaped.
- Uses
wp_delete_file()instead of rawunlink().
📄 License
This plugin is licensed under the GPL-2.0-or-later.
Author: Kushal Dhola