Seamlessly offload WordPress media library to cloud storage — move media library to cloud with ease.
G33ki Cloud Storage For Media Library allows you to offload media library to cloud storage providers effortlessly. If you want to move media library to cloud for better performance, reduced hosting costs, and global CDN delivery, this plugin is for you.
|
|
|
|
Built-in tools to diagnose and fix common cloud storage issues — no manual database edits needed.
|
Scans all offloaded files via HEAD requests. Files returning 403 AccessDenied or other errors are listed with a one-click fix that sets G33ki Cloud > Fix Permissions |
Finds offloaded images where thumbnail sizes are missing from the cloud. Common after bulk offload interruptions or when WordPress generates new image sizes. Uploads missing thumbnails and stores their cloud URLs. G33ki Cloud > Fix Thumbnails |
Detects when your CDN URL, bucket, or region settings changed but stored media URLs still point to the old location. Bulk-updates all URLs to match current settings — no re-uploading needed. G33ki Cloud > Fix URLs |
This plugin connects to external cloud storage providers to automatically offload and serve your media files. Depending on your configuration, it relies on one of the following third-party services:
Used to store and serve your media files globally.
- Data sent: Your media files (images, videos, documents), filenames, and MIME types are sent securely to Amazon S3 whenever you upload a new file or use the bulk offload tool.
- Terms of Use: AWS Service Terms
- Privacy Policy: AWS Privacy Notice
Used to store and serve your media files globally.
- Data sent: Your media files (images, videos, documents), filenames, and MIME types are sent securely to DigitalOcean whenever you upload a new file or use the bulk offload tool.
- Terms of Use: DigitalOcean Terms of Service
- Privacy Policy: DigitalOcean Privacy Policy
Used to store and serve your media files globally.
- Data sent: Your media files (images, videos, documents), filenames, and MIME types are sent securely to Google Cloud Storage whenever you upload a new file or use the bulk offload tool.
- Terms of Use: Google Cloud Terms
- Privacy Policy: Google Cloud Privacy Notice
| Requirement | Minimum |
|---|---|
| WordPress | 5.0+ |
| PHP | 7.2+ |
| Cloud Account | S3, Spaces, or GCS |
# Clone the repo
git clone https://github.com/gunjanjaswal/g33ki-cloud-storage-for-media-library.git
# Copy to your WordPress plugins directory
cp -r g33ki-cloud-storage-for-media-library /path/to/wp-content/plugins/Or via WordPress admin:
- Plugins > Add New > Upload Plugin
- Upload the ZIP file
- Activate
- Go to G33ki Cloud > Settings
| Field | Example |
|---|---|
| Access Key ID | AKIAIOSFODNN7EXAMPLE |
| Secret Access Key | wJalrXUtnFEMI/K7MDENG/... |
| Bucket Name | my-media-bucket |
| Region | us-east-1 |
| Field | Example |
|---|---|
| Access Key | DO00XXXXXXXXXXXXXXXXXX |
| Secret Key | your-secret-key |
| Space Name | my-space |
| Region | nyc3, sfo3, sgp1 |
| Field | Example |
|---|---|
| HMAC Access Key | GOOGXXXXXXXXXXXXXXXXX |
| HMAC Secret Key | your-hmac-secret |
| Bucket Name | my-gcs-bucket |
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ WordPress │ │ Plugin │ │ Cloud │
│ Upload │────▶│ Auto Sync │────▶│ Storage │
│ │ │ │ │ (S3/DO/GCS) │
└──────────────┘ └──────────────┘ └──────────────┘
│
▼
┌──────────────┐
│ URL Rewrite │
│ ─────────── │
│ Post Content │
│ Srcset URLs │
│ Thumbnails │
│ Theme/Header │
│ CDN Delivery │
└──────────────┘
- Upload — Media uploaded to WordPress as usual
- Sync — Plugin automatically copies to cloud storage
- Rewrite — All URLs rewritten to cloud/CDN endpoints
- Serve — Images delivered from cloud, not your server
- (Optional) Cleanup — Local files removed to save disk space
| Page | Description |
|---|---|
| Settings | Configure provider, credentials, CDN, path prefix, local file removal |
| Bulk Offload | Migrate entire media library to cloud with progress tracking & auto-retry |
| Restore Local | Download cloud files back to server before deactivating |
| Fix Permissions | Scan for 403/404 errors and set public-read ACL |
| Fix Thumbnails | Find & upload missing thumbnail sizes to cloud |
| Fix URLs | Update stale URLs after CDN/bucket/region config changes |
g33ki-cloud-storage-for-media-library/
│
├── 📄 g33ki-cloud-storage-for-media-library.php ← Plugin entry point
│
├── 📁 includes/
│ ├── 🔧 class-g33ki-cloud-storage-for-media-library.php ← Core orchestrator
│ ├── ⚙️ class-settings.php ← Settings & AJAX handlers
│ ├── ☁️ class-uploader.php ← Auto-sync new uploads
│ ├── 📦 class-bulk-offload.php ← Bulk migration
│ ├── ⬇️ class-bulk-restore.php ← Bulk restore
│ ├── 🔐 class-fix-permissions.php ← Scan & fix ACL
│ ├── 🖼️ class-fix-thumbnails.php ← Fix missing thumbs
│ ├── 🔗 class-fix-urls.php ← Fix URL mismatches
│ ├── 🔏 class-s3-signing.php ← AWS Sig V4 signing
│ ├── ✅ class-dependency-checker.php ← PHP requirements
│ │
│ ├── 📁 providers/
│ │ ├── 🏗️ class-provider-base.php ← Abstract base
│ │ ├── 🟠 class-s3-provider.php ← Amazon S3
│ │ ├── 🔵 class-spaces-provider.php ← DigitalOcean Spaces
│ │ └── 🔴 class-gcs-provider.php ← Google Cloud Storage
│ │
│ └── 📁 views/
│ ├── 🖥️ settings.php ← Settings page UI
│ ├── 📦 bulk-offload.php ← Bulk offload UI
│ ├── ⬇️ bulk-restore.php ← Bulk restore UI
│ ├── 🔐 fix-permissions.php ← Fix permissions UI
│ ├── 🖼️ fix-thumbnails.php ← Fix thumbnails UI
│ └── 🔗 fix-urls.php ← Fix URLs UI
│
├── 📁 assets/
│ ├── 🎨 css/admin.css ← Modern admin styles
│ └── ⚡ js/admin.js ← Admin functionality
│
├── 📄 readme.txt ← WordPress.org readme
└── 📄 README.md ← You are here
- WordPress 7.0 Connectors API integration (tested against
D:\wamp64\www\wordpress7): registers Amazon S3, DigitalOcean Spaces, and Google Cloud Storage ascloud_storageconnectors on thewp_connectors_initaction. - Each provider's connector links back to this plugin's settings page for credential management (
credentials_url). - The plugin stores multiple credentials per provider (
access_key,secret_key,bucket,region) inside one optiong33ki_settings. The Connectors API'sapi_keyauth method only handles a single setting value, so connectors are registered withmethod: noneto act as informational/navigation entries. Full multi-field central management will land once core supports it (or after a future option refactor). - Added
g33ki_register_connectorsaction hook so third-party code can register richer connectors against the same providers.
- Updated "Tested up to" to WordPress 7.0.
- Bumped minimum PHP requirement to 7.4 (WordPress 7.0 dropped support for PHP 7.2 and 7.3).
- Added "Support on Ko-fi" (https://ko-fi.com/gunjanjaswal) and "Contact Developer" links to plugin row meta on the Plugins screen.
- Added
Requires at least,Tested up to, andRequires PHPheaders to the main plugin file.
- Rebranding: Renamed to G33ki Cloud Storage For Media Library.
- SEO: Improved description for better search visibility on "offload media library" and "move media to cloud" keywords.
- Fix: Removed inline script tag from fix-urls.php template.
- Fix: Replaced
ob_start()full-page buffering withwp_template_enhancement_output_buffer. - Docs: Added External Services declaration block to document S3/DO/GCS usage.
- New: Full-page output buffer URL rewriting — catches theme-hardcoded image URLs.
- New: Handles http/https URL variations and relative
/wp-content/uploads/paths. - New: Filters for
post_thumbnail_html,widget_text,custom_logo,wp_get_attachment_image,header_image_tag.
- New: Fix Permissions, Fix Thumbnails, Fix URLs repair tools.
- New: Auto-retry on connection timeouts (up to 5 retries per batch).
- New: Smart re-link — detects existing cloud files and skips re-upload.
- Initial release with Amazon S3, DigitalOcean Spaces, and Google Cloud Storage support.
This project is licensed under the GPLv2 or later — see the LICENSE for details.