Offloading media to Cloudflare R2

Halaman ini belum diterjemahkan โ€” menampilkan versi bahasa Inggris.

Create the bucket

  1. In the Cloudflare dashboard, open R2 Object Storage and create a bucket.
  2. Create an API token scoped to that bucket with Object Read & Write.
  3. Optional but recommended: connect a custom domain (or enable the r2.dev subdomain) so files can be served publicly.

Connect MediaDock

Under Media โ†’ MediaDock โ†’ Storage locations, add a location, pick the Cloudflare R2 preset, and fill in your account endpoint, bucket and keys. For better security, put the keys in wp-config.php instead:

define( 'MDK_STORAGE_R2_KEY', '...' );
define( 'MDK_STORAGE_R2_SECRET', '...' );

Click Test connection โ€” you should see "Connection OK."

Move files

Every file is copied, verified by checksum, and only then removed locally ("Move" mode) โ€” or kept locally too ("Mirror" mode). Bring files back to local reverses everything byte-for-byte.