CPW Media Offload for Cloudflare R2

CPW Media Offload for Cloudflare R2

Details
View on WordPress

CPW Media Offload for Cloudflare R2 copies your WordPress Media Library to a Cloudflare R2 bucket and rewrites the media URLs of your site so visitors download images, videos and documents from Cloudflare instead of your web server.

The Cloudflare R2 free tier includes 10 GB of storage and, when the bucket is served through a custom domain, no egress fees. That makes it a practical way to keep a small hosting plan fast: your server stops sending megabytes of images on every page view and stops filling its disk with thumbnails.

What it does

  • Uploads new media, and every generated thumbnail size, to your R2 bucket.
  • Optionally deletes the local copy after a successful upload, so the uploads folder stops growing.
  • Rewrites attachment URLs, srcset sources, post content, widgets and blocks to the public bucket URL.
  • Bulk tool that offloads an existing library in small batches, with progress and a stop button.
  • Copy files back to the server at any time, per file or for the whole library.
  • Usage bar tuned for the 10 GB free tier, measured directly on the bucket.
  • Optional WebP conversion on upload, so the smaller file is what uses your storage allowance.
  • Cloudflare R2 column and per file actions inside the Media Library, including sending a changed file again.
  • Rebuild tool that restores the offload index by checking the bucket, without uploading anything.
  • Activity log so upload or permission problems are visible without server access.

Page builder and theme compatibility

Media URLs stored inside page builder data are rewritten as well, so background images, galleries and sliders keep working after an offload:

  • Elementor and Elementor Pro, including generated CSS files and background images.
  • Divi, Beaver Builder and WPBakery Page Builder.
  • Block themes, classic themes, the block editor and any theme that uses the standard WordPress media functions.

Elementor’s CSS cache is cleared automatically after an offload so its generated files point at the new URLs.

Languages

The plugin is fully internationalised. Translations are provided through translate.wordpress.org, where Brazilian Portuguese and any other language can be contributed.

Security

  • The secret access key is encrypted with your WordPress security keys before it is stored.
  • Credentials can be defined as constants in wp-config.php and kept out of the database entirely.
  • Every form is protected with nonces and capability checks.
  • No third party SDK is bundled: requests are signed with AWS Signature Version 4 and sent through the WordPress HTTP API.

External services

This plugin connects to the Cloudflare R2 storage service, which is the whole purpose of the plugin. It does not connect to any other external service and it sends no analytics or telemetry anywhere.

Cloudflare R2 (S3 compatible API)

  • When: whenever a file is offloaded, restored, deleted or listed, and when you use the Test connection or Recalculate storage usage buttons.
  • Where: https://<your-account-id>.r2.cloudflarestorage.com (or the EU or FedRAMP jurisdiction endpoint you select, or a custom endpoint you enter).
  • What is sent: the media files you choose to offload, their file names and content types, your R2 access key id, a request signature generated from your secret access key, and a user agent string containing the plugin version and your site address.
  • What is received: the storage responses of the service, including object listings and sizes used by the usage bar.

Files served to your visitors are additionally requested from the public bucket URL you configure (an r2.dev address or your own custom domain).

Cloudflare terms of service: https://www.cloudflare.com/terms/
Cloudflare privacy policy: https://www.cloudflare.com/privacypolicy/

Details

Plugin code:
cpw-media-offload-for-cloudflare-r2
Plugin version:
1.2.1
Outdated:
No
WP version:
6.0 or higher
PHP version:
7.4 or higher
Test up to WP version:
7.1
Total installations:
0
Last updated:
2026-09-01
Rating:
Times rated:
0
cdn
cloudflare
media-offload
r2
storage