This detailed guide will walk you through the entire process of integrating Cloudflare R2 with Offload Media. We will cover how to create and configure an R2 bucket, generate API tokens, and adjust the plugin’s settings.
Follow these steps to successfully set up Cloudflare R2 with your offload media plugin.
Log in to your Cloudflare account and navigate to your Cloudflare Dashboard.
In the Cloudflare Dashboard, navigate to the left sidebar and select “ R2 Object Storage “, then click on “ Overview ” to access the R2 management area.
From there, click on the “ Create Bucket “ button to begin the process of creating your bucket.
Enter a unique and identifiable name for your bucket.
Keep the remaining options as default without making any changes, and click “ Create Bucket “ to finalize the process.
Once the bucket is created, Go to settings, and scroll down to the “ R2.dev Subdomain” section on your bucket’s details page.
Click on “ Allow Access “ to enable access to your R2.dev bucket URL.
Then, A pop-up will appear, asking you to type “allow” to grant permission.
You will get the Cloudflare Bucket Public URL from here.Dont forget to copy the URL as it is needed while configuring the plugin. This is the account ID, please copy the key from the URL. The key starts after “//” and ends before “.r2”.
For example, in the URL https://a2bsd4jb34nk6hhu23b3adsaf4.r2.cloudflarestorage.com, the key is a2bsd4jb34nk6hhu23b3adsaf4.
For creating Access key and secret key, Return to your Cloudflare Dashboard >> navigate to R2 Object Storage Overview, click on “ API “ from the window , and select “ Manage R2 API Tokens “.
This will redirect you to the R2 API page. Click the “ Create API Token “ button to begin creating your API token
An API creation page will appear, where you’ll need to configure the settings for your API.
Start by assigning a name to your API. In the Permissions section,select “Admin Read & Write“.
Finally click the Create “ API Token “ button.
Here, you will find the Access Key and Secret Key. Be sure to copy them right away, as you will not be able to access this page again later
Step 1: Navigate to the Configuration Page
After successfully installing the plugin, go to the WordPress admin dashboard and select: Offload Media >> Configure
You’ll be greeted with a welcome screen. Click the “ Next “ button to proceed to the service selection page.
Step 2: Choose Your Cloud Service
On the service selection page, choose the cloud storage service you want to configure.
For this guide, we’ll select “ Cloudflare “. After making your selection, click “ Next “ to continue.
Step 3: Cloudflare Configuration Screen
You’ll now see the cloudflare Configuration welcome screen. If you need additional help during setup, a link to the documentation page is provided for your convenience.
Click “ Next “ to proceed to the credentials setup.
Step 4: Enter Cloudflare R2 Credentials
On the next screen, enter the credentials you previously created for your Cloudflare R2 account. This typically includes your Access Key,Account ID,Bucket Name and Secret Key.
After entering the credentials, click Next to verify them.
Step 5: Verify and Save Configuration
Once the credentials are verified:
Congratulations! You’ve successfully configured the Offload Media plugin with Cloudflare R2. Your media files are now ready to be seamlessly offloaded to your cloud storage.
If you have questions about our plugin(s), are experiencing issues with any of our plugin