====== Set Up CloudFront CDN in LiteSpeed Cache for WordPress ====== ===== Create CDN with CloudFront===== {{:litespeed_wiki:cache:lscwp:configuration:cdn:cloudfront-1.png?800|}} - Set up [[ https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/GettingStarted.html | AWS CloudFront CDN ]] - Get your CloudFront **Domain Name** - Make sure your site can be visited directly through the CloudFront **Domain Name** ===== Set Up in LSCache Plugin ===== {{:litespeed_wiki:cache:lscwp:configuration:cdn:cloudfront-4.png?800|}} - From the WP Dashboard, navigate to **LiteSpeed Cache > Settings > CDN**. - Set **Enable CDN** to ''ON'' - Enter **CDN URL** as your CloudFront Domain Name - Enable the relevant **Include** buttons. e.g. **Images** and **CSS**. For this example, if we don't **Include JS**, then we also need to remove ''.js'' from **Include File Types** - Set up **Original URL** as your original domain name (and sub-folder if you are using one) ===== Verify ===== Check that the CSS is served from CloudFront \\ {{:litespeed_wiki:cache:lscwp:configuration:cdn:cloudfront-3.png?800|}} Check that the JS is served from the original domain \\ {{:litespeed_wiki:cache:lscwp:configuration:cdn:cloudfront-2.png?800|}}