This article assumes that you’ve already set up an S3 bucket and followed the steps within our Quick Start Guide.
Once the above steps are taken care of, login into the AWS console and visit the CloudFront page. Click Create Distribution followed by Get Started under the Web delivery method.
Populate Origin Domain Name with the desired S3 bucket, however, leave Origin Path blank. Feel free to customize the remaining options if required, but the defaults are fine in most cases.
Click Create Distribution. CloudFront will begin copying all of your files from the specified bucket to its edge servers. This can take a while depending on the size of your Media Library.
Once the Status has changed from In Progress to Deployed, you can configure WP Offload S3 to start serving from CloudFront using the cloudfront.net domain provided. However, we highly recommend that you configure a custom domain for your CloudFront distribution. Using the cloudfront.net domain name is not great for your site’s SEO. See the doc Configure a Custom Domain for CloudFront with HTTPS for step-by-step instructions.
If you are fine with using the cloudfront.net domain name, head over to your WordPress site. Visit the WP Offload S3 screen and enter your cloudfront.net domain name into the CloudFront or Custom Domain option.
Click Save Changes. All of your media library files will now be served from the CloudFront distributed servers.