Speed
Setting up a CDN for WordPress: step-by-step guide
10 March 2025 · 7 min read
A Content Delivery Network (CDN) is a network of servers spread across the world. Instead of loading all files from one server, they are distributed from the server closest to the visitor. The result: lower loading times, less server load and better performance worldwide.
At WP Maintainer we regularly install CDNs for our clients. In this guide we explain step by step how to configure a CDN for WordPress.
What does a CDN do?
A CDN stores static files (images, CSS, JavaScript, videos) on edge servers worldwide. When a visitor requests your website, these files are delivered from the nearest location. This reduces: - Latency (time to first byte, often 50-70% faster) - Server load (up to 80% less traffic on the origin server) - Bandwidth costs - Network congestion
When do you need a CDN?
A CDN is useful when: - You have visitors from multiple countries or continents - You have a lot of static content (images, videos) - You experience peak traffic - You have high uptime requirements - You want to lower your hosting costs
For a purely Dutch website with mainly Dutch visitors, a CDN is less essential — especially if your hosting is already in the Netherlands.
Step 1: Choose a CDN provider
Popular options for WordPress: **Cloudflare (free plan available):** - Worldwide network of 300+ data centres - Free DDoS protection - DNS management - Easy WordPress integration
Step 2: Configure the CDN
The configuration consists of: 1. **Create an account** with your chosen CDN provider 2. **Add your domain** to the CDN 3. **Change your DNS** to the CDN nameservers (with Cloudflare) or configure a CNAME record 4. **Configure SSL** — make sure HTTPS works on the CDN
Step 3: WordPress integration
Use a caching plugin to link the CDN: **LiteSpeed Cache:** Go to CDN > Enter your URL **WP Rocket:** Go to CDN > Activate and enter CNAME **W3 Total Cache:** Go to Performance > CDN > Configure
Step 4: Test the configuration
Check whether the CDN works: 1. Open your website in a browser 2. Open DevTools (F12) > Network tab 3. Load a page 4. Check whether static files are loaded from the CDN domain 5. Test the loading time with GTmetrix or PageSpeed Insights
Common mistakes
- **Not testing the CDN after configuration** - **Ignoring SSL errors** (mixed content warnings) - **Caching dynamic pages** (shopping cart, checkout) - **Not checking whether files are refreshed** after updates
WP Maintainer CDN service
We configure and manage CDNs for our clients. From Cloudflare settings to performance monitoring — we ensure your website always loads fast, wherever your visitors are. Contact us for advice.