1. Home
  2. Knowledge Base
  3. Amazon S3 for WooCommerce
  4. Connect S3‑Compatible providers (Cloudflare R2, Backblaze B2, Wasabi) to Amazon S3 Storage for WooCommerce

Connect S3‑Compatible providers (Cloudflare R2, Backblaze B2, Wasabi) to Amazon S3 Storage for WooCommerce

If your store’s downloadable products or product media live outside AWS, you can still keep them fast, secure, and scalable. Amazon S3 Storage for WooCommerce v3.0.5+ introduces experimental support for S3 compatible providers implementing the AWS S3 API—including Cloudflare R2, Backblaze B2, Wasabi, DigitalOcean Spaces, and more.

If you are seeking documentation on setting up Amazon S3 specifically, click here.

Cloudflare R2 allows you to provide large files to WooCommerce users with zero egress fees

This guide shows you how to connect an alternative S3-compatible providers without giving up the plugin features you already rely on.

The integration requires adding a small PHP snippet to your site. To follow this guide, you should be comfortable adding code snippets to your WooCommerce store.

Prerequisites

  1. Amazon S3 Storage for WooCommerce 3.0.5 or newer installed and activated.
  2. An account with one of the following S3‑compatible providers:
    • Cloudflare R2
    • Backblaze B2
    • Wasabi
    • Any other platform that speaks the AWS S3 API
  3. Your bucket name, access key, secret key, and (where required) a custom endpoint URL.

Step 1: Gather S3-compatible provider credentials (Cloudflare R2, Backblaze B2, etc.)

Each service calls things slightly differently, but you’ll need:

Cloudflare R2 requirements

  • R2 Access Key ID
  • R2 Secret Access Key
  • Endpoint URL: https://<account‑id>.r2.cloudflarestorage.com
  • Region: auto

Go here for more detailed information on setting up Cloudflare R2 for WooCommerce.

Backblaze B2 requirements

  • Application Key ID
  • Application Key
  • Endpoint URL: https://s3.<region>.backblazeb2.com

Wasabi requirements

  • Access Key
  • Secret Key
  • Endpoint URL: https://s3.<region>.wasabisys.com

Can’t find the right values? See your provider’s docs or open a ticket with their support team and mention “S3 compatibility.”

Step 2: Add PHP snippet

Add the code snippet found here, entering the values for your specific provider in place of our placeholder entries. Add the specific provider (cloudflare, backblaze, wasabi, or another supported keyword) and your specific API credentials.

  1. Upload files to your new bucket using the provider’s web UI
  2. In WooCommerce, edit or create products and attach files
  3. Save and test the product on the front end to confirm downloads/streams load correctly.

Basic troubleshooting

SymptomPossible CauseQuick Fix
403 ForbiddenWrong key/secret pairRegenerate keys and update the snippet
SignatureDoesNotMatchEndpoint URL or region mismatchDouble‑check region slug and custom endpoint
Timeout on large filesProvider’s default part size too smallIncrease multipart upload size in plugin settings
No files listedBucket is empty or you don’t have ListObjects permissionUpload a test file and verify IAM policy

Enable debug mode in plugin settings and uncomment the debug_mode filter included in the sample snippet to surface additional information in your PHP error log.

Next steps

Still stuck with Cloudflare R2 or your preferred provider?

We’re happy to help WooCommerce merchants with basic support when attempting to use Amazon S3 Storage for WooCommerce with Cloudflare R2, Backblaze B2, Wasabi, or any other S3‑compatible platform. Please note that this is considered experimental, and we may or may not be able to get everything up and running (depending on your specific needs.)

Send us a message and include your site URL and provider details so we can take a look! We’re also happy to hear about ways we can improve support for your specific provider.

Was this article helpful?

Related Articles