S3-compatible endpoint
The S3-compatible endpoint option connects WP Media Cloud to any storage provider that implements the S3 API. This covers a wide range of providers including MinIO, Vultr Object Storage, Linode Object Storage, OVHcloud Object Storage, Scaleway Object Storage, and self-hosted S3-compatible servers. If your provider is not listed among WP Media Cloud’s named providers but advertises S3 compatibility, use this option.
Before you start#
You will need:
- An account with an S3-compatible storage provider.
- A bucket on that provider.
- An access key and secret key for the bucket.
- The S3 endpoint URL for your provider and region.
What S3-compatible means#
S3-compatible means the provider implements the Amazon S3 API — specifically the core operations for creating buckets, uploading objects, downloading objects, deleting objects, and listing bucket contents. Most S3-compatible providers support these operations but may differ in edge cases such as bucket policy syntax, ACL behaviour, multipart upload limits, and versioning support.
WP Media Cloud uses the core S3 operations for all offloading, migration, and deletion tasks. If your provider supports standard S3 object operations, it will work.
Step 1: Create a bucket and access credentials#
The exact steps depend on your provider. In general:
- Create a bucket in your provider’s console. Note the bucket name and the region or datacenter it is created in.
- Generate an access key and secret key. Most providers have this under an API keys, credentials, or security section.
- Find the S3 endpoint URL for your provider and region. This is usually documented in the provider’s API reference or object storage setup guide. It will be in a format similar to
https://s3.[region].provider.comorhttps://[region].storage.provider.com.
Common endpoint formats by provider:
- Vultr Object Storage —
https://[cluster-id].vultrobjects.com - Linode Object Storage —
https://[region].linodeobjects.com - OVHcloud Object Storage —
https://s3.[region].io.cloud.ovh.net - Scaleway Object Storage —
https://s3.[region].scw.cloud - MinIO (self-hosted) — the URL of your MinIO server, e.g.
https://minio.yourserver.com
Step 2: Connect the S3-compatible endpoint in WP Media Cloud#
You have two options for connecting your provider to WP Media Cloud. Use whichever suits your setup.
Option A: Setup wizard
Go to WP Media Cloud > Setup Wizard. Select S3-compatible endpoint as the provider. The wizard will prompt you for your endpoint URL, access key, secret key, and bucket name.
Option B: wp-config.php constants
Add the following constants above the /* That's all, stop editing! */ line in wp-config.php:
define( 'WPMC_PROVIDER', 's3compat' );
define( 'WPMC_S3COMPAT_ENDPOINT', 'https://your-s3-endpoint.com' );
define( 'WPMC_S3COMPAT_REGION', 'us-east-1' );
define( 'WPMC_S3COMPAT_ACCESS_KEY', 'your-access-key' );
define( 'WPMC_S3COMPAT_SECRET_KEY', 'your-secret-key' );
define( 'WPMC_S3COMPAT_BUCKET', 'your-bucket-name' );
define( 'WPMC_S3COMPAT_PATH_STYLE', true );
define( 'WPMC_S3COMPAT_CDN_TYPE', 'custom' );
define( 'WPMC_S3COMPAT_CDN_URL', 'https://your-cdn.com' );
Set WPMC_S3COMPAT_ENDPOINT to the full endpoint URL for your provider including the https:// prefix. Set WPMC_S3COMPAT_REGION to the region code your provider uses — if your provider does not use regions, try us-east-1 as a default. Once the constants are in place, go to WP Media Cloud > Settings > Storage and confirm the plugin has loaded them. Constants override any values saved in the settings panel.
Path-style vs virtual-hosted-style URLs#
WPMC_S3COMPAT_PATH_STYLE controls how WP Media Cloud constructs request URLs when communicating with your storage provider.
- Path-style (
true) — bucket name is part of the URL path:https://endpoint.com/bucket-name/file.jpg. Required for MinIO and some other self-hosted providers. Also required when your endpoint does not support subdomain-based bucket routing. - Virtual-hosted-style (
false) — bucket name is a subdomain:https://bucket-name.endpoint.com/file.jpg. This is the AWS S3 default and is used by most managed S3-compatible providers.
If you are unsure which to use, check your provider’s documentation. If the connection test fails with one setting, try the other.
Step 3: Test the connection#
Click Test Connection. WP Media Cloud will upload a small test file to your bucket and confirm it can be read back. A green success message confirms the connection is working.
Step 4: Configure CDN delivery (optional)#
Most S3-compatible providers do not include a built-in CDN. For global edge delivery, configure an external CDN with your bucket’s public URL as the origin. Bunny CDN, KeyCDN, and CDN77 all support custom S3 origins. Configure your CDN hostname in WP Media Cloud > Settings > CDN > Custom CDN URL.
Troubleshooting#
Connection test returns endpoint error or SSL error
The endpoint URL is incorrect or the server’s SSL certificate is not trusted. Confirm the endpoint URL is correct and includes https://. For self-hosted MinIO, ensure the server has a valid SSL certificate.
Connection test returns Access Denied
The access key or secret key is incorrect, or the key does not have sufficient permissions on the bucket. Confirm the credentials in your provider’s console.
Connection test returns path-style or virtual-host error
Try toggling WPMC_S3COMPAT_PATH_STYLE between true and false. Different providers require different URL styles and the wrong setting causes request routing to fail.
Region is not accepted
Some S3-compatible providers do not use regions at all but still require a value in the region field to satisfy the S3 API signature format. Try us-east-1 as a placeholder if your provider does not document a region.
Files upload but URLs are wrong or inaccessible
Confirm that the bucket is publicly accessible and that the file URL format your provider uses is what WP Media Cloud is constructing. If the public URL format differs from the endpoint URL, configure a CDN URL in Settings > CDN to override the default URL construction.