For WordPress on Apache, performance gains usually come from a few operational improvements done in the right order: cache headers, compression, connection tuning, and measurement discipline.
Step 1: Baseline your current performance
- Measure TTFB and total load time from at least 2 regions.
- Capture CPU, memory, and Apache worker usage during load.
- Record p95 response times before changes.
Step 2: Tune Apache connection behavior
For prefork-based setups, conservative timeout values usually help under scanner traffic and burst load.
Timeout 60
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 2
Then tune your MPM worker limits based on memory headroom and observed concurrency.
Step 3: Compress and cache static output
- Enable
mod_deflatefor text responses - Set expires/cache headers for static assets
- Avoid over-caching HTML for logged-in users
Step 4: Optimize WordPress hot paths
- Disable or protect
xmlrpc.phpif not required - Use object cache (Redis/Memcached) where possible
- Audit heavy plugins with query profiling
- Reduce homepage query complexity (widgets, related-post scans, etc.)
Step 5: Add CDN and edge cache controls
With Cloudflare, ensure cache rules and origin headers are not in conflict. One clear caching strategy is better than overlapping plugin/CDN rewrites.
Step 6: Verify impact after tuning
ab -n 1000 -c 20 https://www.wordpresshosting.solutions/
# or use k6/hey for modern load tests
Track p50/p95 latency and worker saturation after each change. Keep the configuration that improves performance without increasing error rates.
Validation
Re-test key user paths and review service logs after each change.
Further reading: Core Web Vitals Overview
Related posts: