# 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](/setup/cloudflare-r2)
- [Amazon S3](/setup/amazon-s3)
- [Wasabi](/setup/wasabi)
- [Backblaze B2](/setup/backblaze-b2)
- [DigitalOcean Spaces](/setup/digitalocean-spaces)
- [Akamai (Linode)](/setup/akamai-linode)
- [Scaleway](/setup/scaleway)
- [Vultr](/setup/vultr)
- [MinIO](/setup/minio)
- [Any other S3-compatible storage](/setup/s3-compatible)

Not sure which to use? See [which storage should I use](/storage).

## 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`.

Updated 2026-11-06.

Source: https://www.offloft.com/docs/connect-a-provider
