Browser Request
→ Cloudflare CDN cache (2h TTL for HTML, 1y for static)
→ Nginx proxy cache (10min HTML, 30d static)
→ WP Super Cache (static HTML files)
→ WordPress PHP (only on cache miss)
Already configured in our .htaccess template.
# Check cache files exist
docker compose exec wordpress ls /var/www/html/wp-content/cache/supercache/Visit your site in incognito — check HTML source for <!-- Dynamic page generated in X seconds. --> followed by <!-- Cached page -->.
- Caching: ON
- Cache delivery: mod_rewrite (fastest)
- Cache timeout: 1800 seconds (30 minutes)
- Preload: OFF (Cloudflare handles warming)
Our nginx.conf includes:
- 10-minute cache for HTML pages
- 30-day cache for static assets (images, CSS, JS)
- Cache bypass for logged-in users, POST requests, query strings
curl -I https://yourdomain.com
# Look for: X-Cache-Status: HIT# Clear Nginx cache
docker compose exec nginx rm -rf /tmp/nginx-cache/*See 09-cloudflare.md for full setup.
- Auto-converts to WebP on upload
- Lossless compression preserves quality
- Backs up originals
Our config automatically serves .webp files when:
- The browser sends
Accept: image/webpheader - A
.webpversion exists on disk
- Upload at max 2560px width (Imagify auto-resizes)
- Use descriptive filenames:
3-axle-dump-trailer-front-view.jpg - Always set alt text
- Use
loading="lazy"for below-the-fold images (Jetpack Boost adds this)
Jetpack Boost generates critical CSS for each page template, inlining above-the-fold styles and deferring the rest.
Enable in Jetpack → Boost → Critical CSS.
Our .htaccess / nginx.conf set:
- Images/fonts: 1 year
- CSS/JS: 1 month
- HTML: 60 seconds (Cloudflare handles longer caching)
Enabled in both Nginx and Apache configs. Compresses text-based assets by ~70%.
Test regularly with: