DEV Community

kerryhank
kerryhank

Posted on

Cloudflare Performance Tuning for WordPress: What Actually Matters

We serve kkinvesting.io across 40+ countries in 17 languages through Cloudflare. Here is what made the biggest difference.

Cache Rules Per Language

Default Cloudflare cache rules do not handle multilingual sites well. We configure:

  • Cache by language path (/en/*, /ja/*, etc.)
  • Different TTLs for static vs dynamic content
  • Bypass cache for admin and preview URLs

Browser Rendering API

Cloudflare offers a Browser Rendering API we use for:

  • Generating screenshots of competitor sites
  • Pre-rendering JavaScript-heavy pages
  • Content extraction for research

Security Without Breaking UX

  • WAF rules that do not block legitimate API calls
  • Rate limiting per IP with higher thresholds for API endpoints
  • Bot protection that allows search engine crawlers

Core Web Vitals Results

After optimization:

  • LCP: < 2.5s (was 4.2s)
  • FID/INP: < 100ms
  • CLS: < 0.1

The biggest win was enabling Cloudflare's Early Hints and setting proper cache headers.

Free tutorials: kkinvesting.io

Top comments (0)