Site icon BitBook

Testing Cloudflare on WordPress: Does It Speed Up Your Site?

Cloudflare can speed up a WordPress site, but it is not automatic magic. It helps most when it can cache static assets, serve visitors from a closer edge location, compress files, and reduce traffic hitting the origin server.

The only honest way to know whether Cloudflare helped your site is to measure before and after under similar conditions.

What Cloudflare Usually Improves

Cloudflare sits between visitors and your origin server. For a normal WordPress site, it can help with:

By default, Cloudflare does not cache normal HTML pages for WordPress. That matters because WordPress page generation can still require PHP, plugins, theme code, and database queries.

What Cloudflare Will Not Fix By Itself

Cloudflare is not a substitute for a healthy WordPress install.

It will not automatically fix:

If the origin server takes two seconds to generate HTML, Cloudflare may still serve static files quickly while the main document remains slow.

Step 1: Record a Baseline

Test before changing DNS. Use the home page and at least one real article page.

Run this a few times:

curl -sS -o /dev/null \
  -w 'code=%{http_code}\ndns=%{time_namelookup}\nconnect=%{time_connect}\nttfb=%{time_starttransfer}\ntotal=%{time_total}\n' \
  https://example.com/

The useful numbers are:

Save the output. One request is not enough; take several readings and look for the pattern.

Step 2: Run a Lighthouse Test

Chrome Lighthouse gives a broader view of page performance.

  1. Open the page in Chrome.
  2. Open DevTools.
  3. Go to the Lighthouse tab.
  4. Run a mobile performance test.
  5. Save the score and the key metrics.

Watch especially:

Lighthouse scores vary, so compare the same page, same device class, and similar network conditions.

Step 3: Enable Cloudflare

The basic setup:

  1. Add the domain to Cloudflare.
  2. Let Cloudflare scan existing DNS records.
  3. Verify the WordPress A, AAAA, or CNAME records are correct.
  4. Set public web records to proxied, shown as the orange cloud.
  5. Change nameservers at the registrar to Cloudflare’s nameservers.
  6. Wait for DNS to update.

Confirm traffic is going through Cloudflare:

curl -I https://example.com/

Look for headers such as:

server: cloudflare
cf-cache-status: DYNAMIC
cf-ray: ...

DYNAMIC on the HTML page is normal unless you configured page caching.

Step 4: Retest the Same Pages

Run the same curl timing test again:

curl -sS -o /dev/null \
  -w 'code=%{http_code}\ndns=%{time_namelookup}\nconnect=%{time_connect}\nttfb=%{time_starttransfer}\ntotal=%{time_total}\n' \
  https://example.com/

Then test a static asset such as a CSS file, JavaScript file, image, or font:

curl -I https://example.com/wp-content/themes/your-theme/style.css

For static assets, the important header is:

cf-cache-status: HIT

Common values:

If you see MISS, refresh and test again. The first request often warms the cache.

Step 5: Interpret the Results

Cloudflare helped if you see some combination of:

Cloudflare did not solve the main bottleneck if:

WordPress Settings Worth Checking

For a typical WordPress site behind Cloudflare:

Simple Results Table

Track a few readings like this:

Test Before Cloudflare After Cloudflare
Home page TTFB Write value here Write value here
Home page total time Write value here Write value here
Article page TTFB Write value here Write value here
CSS cache status No Cloudflare HIT/MISS/DYNAMIC
Lighthouse mobile score Write value here Write value here

Bottom Line

Cloudflare usually improves WordPress when the site serves lots of static assets, has visitors in multiple regions, or needs protection from traffic spikes. It helps less when the real problem is slow PHP, slow database queries, heavy plugins, or oversized images.

Measure first, enable Cloudflare, then measure again. If static assets show cache hits but HTML remains slow, the next fix is WordPress performance work, not another CDN setting.

Exit mobile version