WordPress Performance
Connecting a CDN to WordPress and Verifying It's Actually Working
A CDN serves your images, CSS and JS from a server near each visitor instead of your one origin server — here's how to connect Cloudflare, set cache rules, and confirm it's live.
Free
Cloudflare tier covers CDN for most WordPress sites
NVMe
SSD + LiteSpeed origin behind the CDN
1-click
WordPress installer to test cache rule changes
24/7
Human support if DNS propagation stalls
In short
A CDN (content delivery network) copies a site's static files — images, CSS, JavaScript, fonts — onto servers spread around the world, so a visitor in Sydney loads them from a nearby edge server instead of crossing the globe to your origin server. For WordPress, the fastest setup is pointing your domain's nameservers or DNS through Cloudflare's free plan, letting it proxy traffic, then setting cache rules so static assets are cached at the edge while dynamic pages (cart, login, admin) pass through untouched.
You confirm it's working by checking response headers for a cache HIT status and by testing load times from a few different regions, not just your own location.
A CDN doesn't replace your hosting — it sits in front of it. Your origin server, running on NVMe SSD with LiteSpeed, still generates the page and handles logins, checkout and dynamic content; the CDN's job is purely to cache and re-serve the static parts (images, stylesheets, scripts, fonts) from a location physically closer to whoever's requesting them. The gap this closes is real: a visitor 8,000 miles from your server feels every one of those milliseconds on every image request, and a CDN is the standard fix.
Cloudflare is the most common way to add this to WordPress because its free tier already includes a CDN, and setup is DNS-based rather than requiring a plugin change or code edit. The steps below cover connecting Cloudflare, the cache rules worth setting deliberately rather than trusting the defaults, and how to actually verify assets are being served from the edge rather than assuming the setup worked.
Step 1: Point Your Domain Through Cloudflare
Sign up for Cloudflare and add your domain — it scans your existing DNS records automatically and shows you a list to review before anything changes. Update your domain's nameservers at your registrar to the two Cloudflare nameservers shown, then wait for propagation, which usually completes within a few hours though it can occasionally take up to 24. Once active, Cloudflare shows your domain status as 'Active' in its dashboard.
During this step, double-check that your A record (or CNAME, if hosted behind a subdomain) points to your actual server IP and that the little cloud icon next to it is orange (proxied), not grey (DNS-only) — a grey cloud means Cloudflare is only handling DNS lookups, not proxying or caching traffic, which skips the CDN entirely.
Step 2: Set Cache Rules That Don't Break WordPress
Cloudflare's default caching handles static file types reasonably well out of the box, but WordPress needs a couple of explicit rules to avoid two common failures: logged-in users seeing a cached page meant for logged-out visitors, and a cart or checkout page getting cached and showing stale contents. Under Caching > Cache Rules (or Page Rules on older accounts), set a rule that bypasses cache for paths like /wp-admin/*, /wp-login.php, and any cart or checkout URL your theme or e-commerce plugin uses.
For everything else — images, CSS, JS, fonts — a 'Cache Everything' rule with a browser cache TTL of several hours to a few days is typical, since these files rarely change and rarely need to be re-fetched from origin. If you're running WooCommerce, also exclude any cookie-based session paths from caching, since caching a response tied to one shopper's session and serving it to the next visitor is the single most common CDN misconfiguration on WordPress stores.
Step 3: Layer On WordPress-Side Caching Too
A CDN caches at the edge, but pairing it with server-side caching closes the loop for anything the CDN doesn't catch or that expires between edge refreshes. LiteSpeed's own caching, available through a caching plugin on LiteSpeed-based hosting, works alongside Cloudflare rather than against it — the CDN handles the geographic distance problem, LiteSpeed cache handles how fast the origin itself responds when the CDN does need to fetch fresh content.
Image optimization plugins and lazy loading still matter even with a CDN in place, since the CDN serves images faster but doesn't shrink them — a 4MB unoptimized photo served instantly from a nearby edge server is still a 4MB download for a visitor on a slow mobile connection.
Step 4: Verify the CDN Is Actually Serving Assets
Don't assume the setup worked — check it. Open your site's browser developer tools, go to the Network tab, reload the page, and inspect the response headers on a static asset like an image or a CSS file. Look for a cf-cache-status header showing HIT (served from Cloudflare's edge cache) rather than MISS or DYNAMIC. The first load after a change often shows MISS while the edge cache populates; a reload a few seconds later should flip to HIT.
For a geographic check, use an online tool that tests load time from multiple regions, or ask someone in a different country to run a page speed test and compare their result to yours. If cf-cache-status never shows HIT on static assets, check that the DNS record's cloud icon is proxied (orange) and that no cache rule is unintentionally set to bypass everything.

CDN on the Edge, Fast Hosting Underneath
A CDN only fixes the distance problem — the origin server still needs to be fast for the CDN to have something fast to cache in the first place.
Hosting Cheap runs WordPress on pure NVMe SSD storage with LiteSpeed caching, giving Cloudflare (or any CDN) a quick origin to pull fresh content from whenever the edge cache needs refreshing.
- NVMe SSD + LiteSpeed origin server behind any CDN setup
- 1-click WordPress installer for testing cache rules safely
- Free SSL that stays compatible with Cloudflare's proxy mode
- 24/7 human support if DNS or cache rules don't behave as expected
Why Hosting Cheap
What you get
Fast origin server
NVMe SSD and LiteSpeed keep response times low whenever the CDN needs to fetch fresh content from origin.
Free auto-renewing SSL
Certificates stay compatible with Cloudflare's proxied (orange cloud) mode without manual reconfiguration.
1-click WordPress installer
Spin up a test site to try cache rules and CDN settings before touching a live store or blog.
Free managed migration
Move an existing WordPress site over without losing DNS records needed for a clean CDN setup.
Daily backups
A restore point exists if a cache rule change causes unexpected page behavior.
24/7 human support
Get help diagnosing DNS propagation delays or cache rules that aren't serving assets from the edge.
How It Works
Get set up in a few steps
Connect your domain to Cloudflare
Update nameservers, confirm DNS records are correct, and set the proxy (orange cloud) status on.
Set cache rules for WordPress paths
Bypass cache for admin, login and cart URLs; cache static assets like images, CSS and JS aggressively.
Verify with response headers
Check cf-cache-status for a HIT on static assets and test load times from more than one region.
Included
Everything you need, on every plan
- Domain nameservers pointed to Cloudflare and status showing Active
- DNS A record cloud icon set to proxied (orange), not DNS-only (grey)
- Cache bypass rule set for /wp-admin/*, /wp-login.php and cart/checkout paths
- Cache Everything rule set for static assets with a reasonable browser TTL
- LiteSpeed or plugin-based server caching enabled alongside the CDN
- cf-cache-status header showing HIT on images and CSS after a reload
- Load time tested from at least one region far from your origin server
FAQ
Frequently asked questions
How do I set up a CDN for WordPress for free?
Sign up for Cloudflare's free plan, point your domain's nameservers to it, and enable the proxy (orange cloud) on your DNS records. This gives WordPress CDN coverage for static assets without needing a paid plugin or service.
Does a CDN replace my WordPress hosting?
No, a CDN only caches and re-serves static files closer to visitors; your hosting still generates pages, runs the database and handles anything dynamic. Fast origin hosting on NVMe SSD and LiteSpeed still matters, since the CDN has to fetch from it whenever the edge cache expires.
Why is my WooCommerce cart showing the wrong items after adding a CDN?
This happens when cart or checkout pages get cached and served to the wrong visitor. Add an explicit bypass rule for cart, checkout and account URLs so those pages always come fresh from origin instead of the CDN's cache.
How do I check if Cloudflare is actually caching my WordPress site?
Open browser developer tools, go to Network, reload the page, and check the cf-cache-status response header on a static file like an image. HIT means it's served from the edge cache; MISS or DYNAMIC means it isn't yet, or that path is set to bypass caching.
Will a CDN help visitors close to my server too, or only far away ones?
The biggest gains show up for visitors far from your origin server, but a CDN also reduces load on your origin overall by serving cached assets instead of hitting your server for every request. That indirectly helps nearby visitors too during traffic spikes.
Do I need a plugin to use Cloudflare with WordPress?
No, the core CDN setup happens at the DNS level and needs no WordPress plugin. A Cloudflare-specific plugin can add convenience features like clearing the edge cache from wp-admin, but it isn't required to get CDN coverage working.
Ready for a Fast Origin Behind Your CDN?
Get managed WordPress hosting on NVMe SSD with LiteSpeed caching, from $4.19/mo.
Get Started