Linux 软件免费装
Banner图

OffloadKit — Cloud Media Offloader

开发者 devsyed
更新时间 2026年11月11日 07:27
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

media cdn webp cloudflare r2

下载

0.1.2 0.1.3

详情介绍:

OffloadKit manages media offload, delivery and recovery with Cloudflare R2, AWS S3 and DigitalOcean Spaces. A Google Cloud Storage HMAC adapter is also available; configure its interoperability credentials and delivery URL separately. Uploads can be offloaded during upload or processed through the background queue. Failed transfers retain local copies for retry. For public media with retained local files, delivery falls back locally when a storage check confirms the remote object is missing. Storage errors are not treated as proof that an object is missing; cloud-only media requires repair or restoration if its remote copy is lost. Features CDN presets Cloudflare setup automatically discovers an active custom domain or enabled R2.dev delivery URL. If neither is available, you can opt in to public R2.dev delivery or configure a custom domain. Existing delivery URLs are preserved when reconnecting the same bucket. Delivery settings include CloudFront, Bunny CDN, Fastly, KeyCDN, Gcore, Cloudflare and Azure Front Door presets, plus a custom URL / direct bucket option. Each preset provides a URL example and setup guidance. Configure the CDN origin and HTTPS in its dashboard, enter your complete delivery URL, save, then run Test Connection. Selecting a preset preserves the existing URL and does not provision a CDN or enable CDN-specific cache purging. Legacy URL rewriting covers the full rendered template on WordPress 6.9 and later. On WordPress 6.8, it covers post content and standard WordPress media hooks. Credentials Credentials can be defined in wp-config.php instead of the database, which is the recommended production setup: define( 'R2CLOUDER_PROVIDER', 'r2' ); // r2, s3, spaces or gcs define( 'R2CLOUDER_ACCOUNT_ID', '...' ); // r2 only define( 'R2CLOUDER_REGION', 'us-east-1' ); // AWS region or Spaces datacenter define( 'R2CLOUDER_ACCESS_KEY', '...' ); define( 'R2CLOUDER_SECRET_KEY', '...' ); define( 'R2CLOUDER_BUCKET', '...' ); define( 'R2CLOUDER_PUBLIC_URL', 'https://cdn.example.com' ); define( 'R2CLOUDER_CF_PROVISIONING_TOKEN', '...' ); define( 'R2CLOUDER_CF_API_TOKEN', '...' ); The recommended setup accepts one Cloudflare token with Workers R2 Storage Write. OffloadKit can create or select the bucket, derive the S3 credentials, and configure delivery. Zone Read is optional for automatic custom-domain discovery; Cache Purge is optional for purge-by-URL. Manual bucket-scoped credentials remain available under Advanced. DigitalOcean Spaces uses the selected datacenter endpoint (for example https://nyc3.digitaloceanspaces.com). Google Cloud Storage uses https://storage.googleapis.com with HMAC interoperability keys, not service-account JSON credentials. Configure a public delivery URL or CDN separately. Managed bucket migration supports R2 and AWS S3 only. Cloudflare® and Cloudflare R2 are trademarks of Cloudflare, Inc. This plugin is not affiliated with, endorsed by, or sponsored by Cloudflare, Inc. DigitalOcean onboarding can create a new Standard Storage bucket using a Full access Spaces key, or connect an existing bucket. New buckets are private unless you explicitly allow public object reads. OffloadKit prefills the new bucket delivery URL; CDN configuration remains in DigitalOcean. Existing bucket policies are not modified.

安装:

  1. Upload the OffloadKit ZIP through Plugins > Add New > Upload Plugin, then activate it.
  2. Open Settings > OffloadKit and select your storage provider. Use a separate test bucket for your first connection.
  3. Configure credentials and an HTTPS delivery URL, then run Test Connection before enabling media offloading.
  4. Keep local files while verifying uploads and delivery. Enable optional image conversion or local deletion only after checking the results and keeping independent backups.
Deactivation stops scheduled work and retains settings and media records. Uninstall retains plugin data by default; the optional remove-data setting deletes plugin settings, queue and offload records, but does not delete cloud objects. Pull media back and verify local copies before removing records for cloud-only files.

升级注意事项:

0.1.3 New OffloadKit branding. Existing settings and storage connections are preserved. 0.1.2 Updated the plugin name and text domain for the directory submission. 0.1.1 Settings export writes JSON to standard output. Redirect it in your shell if you want a file.

常见问题:

Do I need a Cloudflare account?

A Cloudflare account is needed only for R2. AWS S3 and DigitalOcean Spaces use their own accounts and credentials. For R2, setup can create or connect a bucket and configure delivery; manual bucket credentials are also supported.

Can I undo the offload?

The pull-back command restores recorded source files to their local WordPress paths. It retains offload metadata if a required download or metadata update fails so you can investigate and retry. Keep independent backups; a missing remote object cannot be recovered without another copy.

What are the bucket migration limitations?

Managed bucket migration supports R2 and AWS S3. Cloudflare Slurper can skip zero-byte objects during S3-to-R2 migration; OffloadKit's destination verification then refuses cutover rather than accepting an incomplete transfer. Automatic repair of skipped empty objects is not available. R2-to-S3 migration requires AWS DataSync and the necessary IAM permissions; this direction has not completed live acceptance testing. Keep source objects and independent backups, and verify migration with a separate test bucket before using it for production media.

Does this work for protected or paid downloads?

Private storage delivery supports signed URLs, but it does not implement membership or purchase authorization. WooCommerce and Easy Digital Downloads protected paths are excluded from new offloads, including forced offloads. Existing cloud copies are not automatically made private or removed; audit any previously offloaded protected content. Do not use public media delivery as an access-control system. Private signed URLs expire. Exclude pages and REST responses containing signed media URLs from external full-page, reverse-proxy and CDN caches, and regenerate URLs for each request. OffloadKit sends private/no-store response headers, but external caches must respect those headers. A cached page can otherwise retain an expired URL or share a valid URL with another visitor. Legacy offload records without provider identity need an ownership audit before switching providers.

更新日志:

0.1.3 0.1.2 0.1.1 0.1.0