Title: CPW Media Offload for Cloudflare R2
Author: Criando Para Web
Published: <strong>September 1, 2026</strong>
Last modified: September 1, 2026

---

Search plugins

![](https://ps.w.org/cpw-media-offload-for-cloudflare-r2/assets/banner-772x250.png?
rev=3676343)

![](https://ps.w.org/cpw-media-offload-for-cloudflare-r2/assets/icon-256x256.png?
rev=3676343)

# CPW Media Offload for Cloudflare R2

 By [Criando Para Web](https://profiles.wordpress.org/criandoparaweb/)

[Download](https://downloads.wordpress.org/plugin/cpw-media-offload-for-cloudflare-r2.1.2.1.zip)

 * [Details](https://wordpress.org/plugins/cpw-media-offload-for-cloudflare-r2/#description)
 * [Reviews](https://wordpress.org/plugins/cpw-media-offload-for-cloudflare-r2/#reviews)
 *  [Installation](https://wordpress.org/plugins/cpw-media-offload-for-cloudflare-r2/#installation)
 * [Development](https://wordpress.org/plugins/cpw-media-offload-for-cloudflare-r2/#developers)

 [Support](https://wordpress.org/support/plugin/cpw-media-offload-for-cloudflare-r2/)

## Description

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/

## Screenshots

[⌊Connection, delivery, offload and free tier usage at a glance.⌉⌊Connection, delivery,
offload and free tier usage at a glance.⌉[

Connection, delivery, offload and free tier usage at a glance.

[⌊Connection settings, with step by step help for finding each value in Cloudflare.⌉⌊
Connection settings, with step by step help for finding each value in Cloudflare
.⌉[

Connection settings, with step by step help for finding each value in Cloudflare.

[⌊Bulk offload running over an existing Media Library.⌉⌊Bulk offload running over
an existing Media Library.⌉[

Bulk offload running over an existing Media Library.

[⌊The whole library offloaded, plus the rebuild and maintenance tools.⌉⌊The whole
library offloaded, plus the rebuild and maintenance tools.⌉[

The whole library offloaded, plus the rebuild and maintenance tools.

## Installation

 1. Install and activate the plugin.
 2. In your Cloudflare dashboard create an R2 bucket and an R2 API token with **Object
    Read and Write** permission.
 3. Go to **Media  Cloudflare R2** and fill in the account id, access key id, secret
    access key and bucket name.
 4. Click **Test connection**.
 5. Give the bucket a public URL: either enable the `r2.dev` development URL, or, recommended
    for production, connect a custom domain to the bucket in Cloudflare. Paste that
    address in **Public bucket URL**.
 6. Open the **Offload tools** tab and run **Start offloading** to move the existing
    library.
 7. Back in **Settings**, enable **Serve media from R2**.
 8. Only after checking that your site renders correctly, enable **Delete the local
    copy after a successful upload** to free disk space.

## FAQ

### Do I need a paid Cloudflare plan?

No. The R2 free tier includes 10 GB of storage per month plus a monthly allowance
of read and write operations, which is enough for most small and medium sites. The
plugin shows how much of that allowance your media uses.

### Does it work with Elementor?

Yes. Beyond the standard WordPress media functions, the plugin rewrites the URLs
stored inside Elementor documents, so widgets, galleries and background images all
point at Cloudflare. The Elementor editor keeps working with local paths, and Elementor’s
CSS cache is cleared after an offload.

### Will my media break if I deactivate the plugin?

No, as long as the local copies still exist: URLs simply go back to your server.
If you enabled local deletion, run **Copy everything back to the server** in the
Offload tools tab before deactivating.

### Can I keep using the WordPress image editor?

Yes while the local copy is kept. With local deletion enabled, use **Copy back to
server** on that file first, edit it, and it will be offloaded again.

### Does it delete my files from R2 when I uninstall the plugin?

Never. Uninstalling removes only the plugin settings, log and internal post meta.
Your bucket is left untouched.

### I deleted the plugin and lost the record of what was offloaded. What now?

Your files are still on the bucket: the plugin never deletes them. Go to the Offload
tools tab and run **Rebuild the index**, which checks every attachment against the
bucket and restores the record without uploading anything. To stop it happening 
again, keep the setting **Keep the settings and the offload index** enabled, which
is the default from version 1.1.0. Note that deleting a plugin runs its clean up
routine, while updating one does not.

### Does the plugin convert my images to WebP?

Only if you turn it on. With the option enabled, JPEG and PNG uploads are converted
before the thumbnails are generated, so every size is WebP and the smaller file 
is what counts against your storage. GIFs are never converted so animations survive,
and an image is only replaced when the WebP version really is smaller. It applies
to new uploads: images already in the library are left as they are.

### Can several sites share one bucket?

Yes. Give each site a different **Path prefix**, for example `site-a` and `site-
b`.

### What happens to files that fail to upload?

They are flagged and skipped so the bulk tool can continue. The reason is recorded
in the Log tab, and **Queue failed files again** puts them back in line.

## Reviews

![](https://secure.gravatar.com/avatar/43e6edd35ae597ba540554899dead3820f7120ed90c52fc7722ac01a3177ea04?
s=60&d=retro&r=g)

### 󠀁[Excellent! Saves server disk space and speeds up the site with Cloudflare R2](https://wordpress.org/support/topic/excellent-saves-server-disk-space-and-speeds-up-the-site-with-cloudflare-r2/)󠁿

 [pjoaoaraujo](https://profiles.wordpress.org/pjoaoaraujo/) September 1, 2026

I installed this plugin to reduce my hosting storage costs, and the results are 
fantastic. It automatically moves the entire Media Library to Cloudflare R2 and 
successfully frees up local server disk space. The integration with Elementor and
my current theme worked flawlessly without breaking any images or layouts. Serving
the images through Cloudflare’s CDN has also made the website noticeably faster.
It delivers exactly what it promises, features an easy setup, and solves storage
issues efficiently. Highly recommended for anyone looking to offload their media!

 [ Read all 1 review ](https://wordpress.org/support/plugin/cpw-media-offload-for-cloudflare-r2/reviews/)

## Contributors & Developers

“CPW Media Offload for Cloudflare R2” is open source software. The following people
have contributed to this plugin.

Contributors

 *   [ Criando Para Web ](https://profiles.wordpress.org/criandoparaweb/)

[Translate “CPW Media Offload for Cloudflare R2” into your language.](https://translate.wordpress.org/projects/wp-plugins/cpw-media-offload-for-cloudflare-r2)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/cpw-media-offload-for-cloudflare-r2/),
check out the [SVN repository](https://plugins.svn.wordpress.org/cpw-media-offload-for-cloudflare-r2/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/cpw-media-offload-for-cloudflare-r2/)
by [RSS](https://plugins.trac.wordpress.org/log/cpw-media-offload-for-cloudflare-r2/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.2.1

 * Removed the Plugin URI header, which pointed at a page that does not exist yet.
 * Translations are no longer bundled: they come from translate.wordpress.org.

#### 1.2.0

 * The plugin is now called CPW Media Offload for Cloudflare R2. Only the name, 
   the slug and the text domain changed: your settings, your offload index and your
   files on the bucket are untouched.

#### 1.1.1

 * Every credential field on the settings screen now has a “Where to find this in
   Cloudflare” panel showing the exact click path in the Cloudflare dashboard, including
   a warning that the secret access key is only ever displayed once.

#### 1.1.0

 * Deleting the plugin no longer erases your settings and offload index by default.
   A new setting controls it, and files on the bucket were never touched to begin
   with.
 * New tool that rebuilds the offload index by checking the bucket, for libraries
   whose index was lost.
 * New “Send to R2 again” action, per file and in bulk, for files that changed after
   being offloaded.
 * Optional WebP conversion of JPEG and PNG uploads, with a quality setting. Conversion
   runs before the thumbnails are generated, GIFs are left alone, and the original
   is only replaced when the WebP version is actually smaller.

#### 1.0.1

 * Translations are now loaded without load_plugin_textdomain(), which is discouraged
   since WordPress 4.6. Language packs from translate.wordpress.org keep taking 
   precedence over the bundled files.
 * The attachment lookup query now passes its meta key as a prepared placeholder.
 * Declared compatibility with WordPress 7.1.

#### 1.0.0

 * First public release.
 * Offload of new uploads and of existing libraries to Cloudflare R2.
 * URL rewriting for attachments, srcset, post content and page builder data.
 * Elementor, Divi, Beaver Builder and WPBakery compatibility.
 * Multipart uploads for large files, bulk tools, usage meter and activity log.
 * Ready for translation through translate.wordpress.org.

## Meta

 *  Version **1.2.1**
 *  Last updated **1 day ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **7.1**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [cdn](https://wordpress.org/plugins/tags/cdn/)[cloudflare](https://wordpress.org/plugins/tags/cloudflare/)
   [media offload](https://wordpress.org/plugins/tags/media-offload/)[r2](https://wordpress.org/plugins/tags/r2/)
   [storage](https://wordpress.org/plugins/tags/storage/)
 *  [Advanced View](https://wordpress.org/plugins/cpw-media-offload-for-cloudflare-r2/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  1 5-star review     ](https://wordpress.org/support/plugin/cpw-media-offload-for-cloudflare-r2/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/cpw-media-offload-for-cloudflare-r2/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/cpw-media-offload-for-cloudflare-r2/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/cpw-media-offload-for-cloudflare-r2/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/cpw-media-offload-for-cloudflare-r2/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/cpw-media-offload-for-cloudflare-r2/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/cpw-media-offload-for-cloudflare-r2/reviews/)

## Contributors

 *   [ Criando Para Web ](https://profiles.wordpress.org/criandoparaweb/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/cpw-media-offload-for-cloudflare-r2/)