Skip to content
Performance

Cloudflare in front of WordPress: what it fixes, hides and creates

A CDN is a delivery layer, not a performance strategy. Where it genuinely helps, where it masks a problem you still have, and the two settings that break a store.

What does putting Cloudflare in front of WordPress actually change?

Mostafa Nouh — portraitMostafa NouhPublished 7 min read

Where it genuinely helps

  • Static assets served from a nearby edge — images, CSS, JavaScript, fonts.
  • TLS termination close to the visitor, which removes a round trip on a slow network.
  • Absorbing traffic spikes and abusive load before they reach the origin.
  • HTTP/2 and HTTP/3 without touching the origin server's configuration.
  • Full page caching at the edge — but only for pages you have deliberately made cacheable.

Where it hides the problem

The dangerous case is a site that looks fast to its owner because their pages are cached at the edge, while every logged-in visitor, every cart, every checkout and every search result bypasses the cache entirely and meets the original slow origin. The store's best pages are fast; its buying pages are not. The report says the site improved.

Where it creates new problems

SettingWhat it breaks
Caching HTML without excluding cart and checkoutOne customer sees another customer's cart
Rocket Loader / automatic JS deferralTheme and plugin scripts that expect document order
Aggressive minification of inline JSAnything that was already minified or templated
Bot Fight ModeAI crawlers, uptime monitors and legitimate integrations
Auto-minify on an RTL stylesheetNothing, usually — but it is the first thing blamed
Every one of these is a default someone enabled without a reason to.

The order to do this in

  1. Measure time to first byte at the origin, with the CDN bypassed.
  2. Fix the origin: queries, object cache, PHP version, hosting that is not oversold.
  3. Make the pages that can be cached actually cacheable, and exclude the ones that cannot.
  4. Then add the edge, and re-measure the same four page types.
  5. Verify that a non-browser client still receives a 200.

Sources

Contact

Have a site or store that needs to work better?

Tell me what is happening and on which page. A diagnosis is a useful first deliverable on its own.

I read every message myself and reply within one working day — usually with a question or two before anything else, because a scope worth quoting needs them answered.

Available for remote work aligned to EST hours
Mostafa Nouh — portrait

Mostafa Nouh

Full-Stack Developer & Product Builder

Location
Egypt · Remote