Environment Setup
Your goal is to make the site behave deterministically while you tune settings.
Prefer Staging
If you can, do optimization work on a staging clone. It gives you:
- safe rollbacks
- no impact to real visitors
- the ability to disable caches without consequences
If you must work on production, define a test window and a rollback plan.
Safe Testing Mode (Minimum)
| Layer | What to do | Why |
|---|---|---|
| CDN cache | enable Development Mode or bypass caching for your IP | removes edge caching from the equation |
| Page cache | disable temporarily for tuning | ensures changes apply without constant purges |
| Optimizers | pick one owner per feature | prevents double minify/defer/delay conflicts |
| Browser | hard refresh or fresh profile | prevents stale assets |
caution
Do not run two CSS/JS optimization systems at the same time (for example, LSCache page optimization + Perfmatters). Pick one owner per feature.
Plugin Conflict Sweep
Disable other cache/optimization plugins while you tune:
- cache plugins (W3TC, WP Super Cache, etc.)
- minify/aggregate plugins (Autoptimize, etc.)
- "all in one" optimizers that overlap features
Starting Configuration (Safe Defaults)
This is not "the best" configuration. It is a safe starting point that avoids duplicated behavior.
Cloudflare
- Development Mode: ON (during testing)
- Auto-minify: OFF (until you pick a single minifier)
- Rocket Loader: OFF
LSCache
- Page cache: OFF (during tuning)
- Page optimization features: OFF (unless LSCache is the chosen owner)
Perfmatters (or your optimizer)
- Test Mode: ON (if supported)
- Leave all major CSS/JS features OFF until you enable them step-by-step
Quick Verification
Confirm cache headers change when you toggle test mode
curl -sI https://example.com/ | grep -iE 'cf-cache-status|x-litespeed-cache|x-cache|cache-control'