Skip to main content

LCP Case Study

This case study details the complete troubleshooting and optimization process for a WordPress blog suffering from a critical 5.1-second Largest Contentful Paint (LCP) bottleneck. While theory teaches you what LCP is, this practical walkthrough demonstrates how to methodically diagnose cascading failures across the server, caching layer, and frontend to systematically repair a failing site.

Quick Summary

The site's 5.1s LCP came from two main constraints: a slow origin response (TTFB ~450ms) and an unoptimized 2.5 MB PNG hero image. By combining OPcache, caching, and WebP conversion, LCP improved to ~1.9s.

The Scenario

DetailValue
Site typeWordPress blog with 200+ posts
ProblemHomepage feels completely blank for ~4s on mobile devices
LCP elementHero banner image (2.5 MB PNG)
Initial LCP5.1s (Poor)
Initial TTFB450ms (Needs Improvement)
User impact48% mobile exit rate; failing Core Web Vitals reported in Google Search Console

Visible Symptoms

  • The homepage stays stark white until the hero banner finishes downloading completely.
  • Mobile users bounce at a rate of 48% before any readable text becomes visible.
  • Google Search Console issues a sweeping red LCP failure warning across all URL variations.

Step-by-Step Diagnosis

Step 1: Run PageSpeed Insights

Running a synthetic test isolates the metric dragging down the overall experience.

psi-results.txt
PSI Results (Mobile):
LCP: 5.1s (Poor)
CLS: 0.05 (Good)
INP: 180ms (Good)
TTFB: 450ms (Needs Improvement)

Because CLS and INP are passing comfortably, our entire focus narrows perfectly onto the rendering pipeline (TTFB + LCP).

Step 2: Identify the Bottleneck

Opening Chrome DevTools (Performance tab with Web Vitals overlay enabled) proves the LCP element is a massive hero banner image mapped to /wp-content/uploads/hero-banner.png.

A quick WebPageTest waterfall analysis reveals the exact compounding delays:

wpt-waterfall.txt
WebPageTest Waterfall:
DNS: 45ms
TCP/TLS: 120ms
TTFB: 450ms ← Bottleneck 1 (Server struggle)
Hero DL: 2.8s ← Bottleneck 2 (Payload struggle)
CSS parse: 200ms
Total LCP: ~5.1s

Solution: Layer-by-Layer Fixes

LayerBottleneckFix AppliedExpected Impact
ServerHigh TTFB (450ms)Tune PHP-FPM workers, enable OPcache via CyberPanelOrigin TTFB → 150ms
CacheNo page cacheInstall LiteSpeed Cache + enable crawler warmupHTML TTFB → 80ms
CDNHeavy origin fetchesEnable Cloudflare APO + Tiered Cache routingGlobal TTFB stabilized
FrontendRender-blocking CSSGenerate + inline critical CSS for above-the-fold contentFaster First Contentful Paint
Design2.5 MB PNG heroConvert to WebP (280 KB)88% payload reduction
HTMLHero discovered lateInject <link rel="preload" fetchpriority="high">Browser initiates download instantly

Applying the Fixes in Order

By tracking the metrics sequentially, we prove which optimizations moved the needle most:

optimization-timeline.txt
1. Enable OPcache: Raw PHP TTFB drops from 450ms → 250ms
2. Enable LSCache: Cached HTML TTFB drops from 250ms → 80ms
3. Convert hero to WebP: Physical image download time drops from 2.8s → 0.4s
4. Add preload hint: The browser begins fetching the hero 200ms earlier
5. Inline critical CSS: First Contentful Paint improves by 150ms visually

Common Diagnosis Mistakes

MistakeExplanationSolution
Blaming the WordPress theme firstServer response delays ruin LCP regardless of theme quality.Fix the infrastructure (TTFB) before auditing the DOM.
Compressing without convertingShrinking a massive PNG has limits; WebP achieves mathematically superior ratios.Always convert hero assets to AVIF or WebP.
Preloading a bloated imagePreloading delivers the image sooner, but it still takes 3 seconds to download if it is 3 MB.Compress the image first, then preload the optimized file.
Testing after a single cache purgeThe first visit after a cache purge guarantees a cold-cache TTFB miss.Test the URL 3 times sequentially and use the median result.

Hands-On Practice

Perform a Personal Diagnostic

Task: Pull your own homepage up on PageSpeed Insights and identify your baseline targets.

diagnostic.txt
Your LCP Element: _______________
Your LCP Time: ____s
Your TTFB: ____ms

Task: Check your current hero image's file size. Drop it into a WebP converter and calculate your specific payload reduction percentage.

Results Summary

MetricBeforeAfterChange Improvement
LCP5.1s1.9s−63%
TTFB450ms80ms−82%
Hero Image Size2.5 MB280 KB−88%
Mobile Bounce Rate48%31%−17 points
Conclusion

By addressing origin response time (OPcache + caching) and optimizing the hero asset (format + preload), the site cleared Google's LCP threshold and improved the mobile experience.

What's Next