Connect a provider
To connect a provider, open Offloft → Settings → Connection, or the setup wizard on a new site, choose your provider, and paste your access keys and bucket name. Each provider has a step-by-step guide, inside the plugin and on this site, with values to copy and paste.
Guides
- Cloudflare R2
- Amazon S3
- Wasabi
- Backblaze B2
- DigitalOcean Spaces
- Akamai (Linode)
- Scaleway
- Vultr
- MinIO
- Any other S3-compatible storage
Not sure which to use? See which storage should I use.
Connecting in wp-config.php
You can name the connection in wp-config.php. When OFFLOFT_PROVIDER is defined, that configuration takes priority over the one saved in the database. These constants are read:
PHP
define( 'OFFLOFT_PROVIDER', 'r2' );
define( 'OFFLOFT_ACCESS_KEY_ID', '...' );
define( 'OFFLOFT_SECRET_ACCESS_KEY', '...' );
define( 'OFFLOFT_BUCKET', 'my-site-media' );
define( 'OFFLOFT_ACCOUNT_ID', '...' ); // Cloudflare R2
define( 'OFFLOFT_JURISDICTION', '...' ); // Cloudflare R2, when you chose one
define( 'OFFLOFT_REGION', '...' ); // Providers with regions
define( 'OFFLOFT_ENDPOINT', '...' ); // Custom endpoints
define( 'OFFLOFT_PATH_STYLE', true ); // When your provider needs it
define( 'OFFLOFT_DELIVERY_DOMAIN', 'media.yoursite.com' );Then finish without the wizard by running wp offloft complete-setup.