How to configure WordPress to use a CDN Print

  • 0

A content delivery network (CDN) serves your images, CSS and JavaScript from servers near your visitors.

Option 1: Cloudflare (simplest)

Put your whole domain behind Cloudflare (see How to set up Cloudflare). Static files are cached automatically with no WordPress changes.

Option 2: CDN URL with LiteSpeed Cache

If your CDN provides its own hostname (for example cdn.yourdomain.co.uk):

  1. Go to LiteSpeed Cache › CDN.
  2. Turn Use CDN Mapping on.
  3. Enter your CDN URL, including https://, and tick the file types to serve from it (images, CSS, JS).
  4. Save, then purge all caches.

Check it's working

View your page source or use browser developer tools (F12 › Network) to confirm static files load from the CDN address.


Was this answer helpful?

« Back