Case Study: Dropping an E-commerce LCP from 3.8s to 0.9s

Web Görsel
Starting Point
Client: women''s fashion e-commerce, 180k monthly unique visitors, 3,200 SKUs. Problem: "Mobile is slow, Google rankings dropped, cart abandonment climbed to 74%."
Initial Measurements
| Metric | Mobile | Desktop | Target |
|---|---|---|---|
| LCP | 3,840 ms | 2,100 ms | < 2,500 ms |
| INP | 320 ms | 180 ms | < 200 ms |
| CLS | 0.18 | 0.09 | < 0.1 |
| TTFB | 1,120 ms | 680 ms | < 600 ms |
| Lighthouse Performance | 42 | 68 | > 90 |
Stack: PHP 7.4 + WooCommerce, 50+ plugins, shared hosting, jQuery-heavy theme.
Methodology: Measure First, Change Second
- Real-user monitoring (RUM) with web-vitals.js
- WebPageTest "Competitive Benchmark" vs 3 competitors
- Chrome DevTools Performance profiles on home, category, product, cart, checkout
- Wrote hypotheses linking each metric to user behavior
11-Step Optimization
1. Hosting Upgrade (TTFB 1120 → 380 ms)
Shared → LiteSpeed VPS, PHP 8.3, OPcache + JIT. Cost: $12/mo → $45/mo.
2. Database Tuning (TTFB 380 → 260 ms)
- MySQL innodb_buffer_pool_size = 70% RAM
- Slow query log revealed 12 n+1 queries
- wp_options autoloaded rows 3,200 → 420
- Transient cleanup — deleted 18k stale rows
3. CDN + Edge Cache (TTFB 260 → 90 ms regional)
Cloudflare Pro; Page Rules set static assets 1 year, HTML 2h stale-while-revalidate.
4. Image Optimization (+600 ms LCP gain)
- All product images to WebP (originals kept as fallback)
- Responsive srcset + sizes: 400px mobile, 1600px desktop
- Native loading="lazy" with first 3 eager
- Hero image with
fetchpriority="high"+ preload
Avg image size 380 KB → 72 KB.
5. JavaScript Cleanup (INP 320 → 140 ms)
- Removed 14 plugins; replaced two sliders with single Swiper
- jQuery + jQuery UI 420 KB → 40 KB vanilla JS
- Third-party pixels (Facebook, GTM) moved to Partytown
- GA4 partytown + delayed load
6. CSS Optimization (+400 ms LCP gain)
- Critical CSS inlined for home, category, product
- Main stylesheet 420 KB → 180 KB (purged unused Woo components)
- font-display: swap + unicode-range for localized subset
7. Font Loading
- Self-hosted fonts (stop Google Fonts)
- Preload + preconnect tuned
- WOFF2 subset 180 KB → 42 KB
8. CLS Fixes (0.18 → 0.04)
- aspect-ratio CSS for product images
- Fixed heights on ad slots
- Skeleton + intersection observer for "Popular Products"
9. Third-Party Discipline
Old site had 24 third-party scripts. Audit reduced to 9. Remaining loaded via Partytown or defer. Chat widget delayed 3s.
10. HTTP/3 + Brotli
Enabled via Cloudflare. Brotli level 6. Avg response size -28%.
11. Architecture
- Redis Object Cache for Woo category pages
- Cart and Account cache-excluded; others full page cached
- Homepage 72 products → 24 + "load more"
Before → After
| Metric | Before | After | Delta |
|---|---|---|---|
| LCP (mobile) | 3,840 ms | 900 ms | -76% |
| INP | 320 ms | 95 ms | -70% |
| CLS | 0.18 | 0.04 | -78% |
| TTFB | 1,120 ms | 90 ms | -92% |
| Lighthouse (mobile) | 42 | 96 | +128% |
| Total JS | 980 KB | 180 KB | -82% |
Business Results (First 60 Days)
- Organic traffic: +38%
- Cart abandonment: 74% → 62%
- Conversion: 2.1% → 3.4%
- Pages/session: 3.8 → 5.9
- Mobile conversion: +68%
- Estimated annual revenue lift: ~$120k
Lessons
- Biggest wins come from overlooked spots: hosting + DB tuning
- Third-party scripts are the main INP killer
- WordPress/WooCommerce isn''t inherently slow — plugin culture is
- Image optimization is the simplest highest-ROI step
- Never optimize without measuring — RUM + lab together
Cost and Timeline
6 weeks; 2 senior developers + 1 DevOps. Total ~$7,500. Paid back in 60 days.
FAQs
Can I do this myself?
Some steps (image optimization, cache plugins) yes. DB tuning, critical CSS, JS splitting need specialists.
Why not migrate to Next.js?
Client didn''t want to change editorial workflow. WP + Woo, properly optimized, hits targets.
Can Shopify see similar gains?
Yes but bounded. Theme/app ecosystem is heavy; Shopify Plus allows better script control. Mid-level tuning adds 40-50 Lighthouse points.
Next Step
Free performance audit for your site — contact us.
Yorumlar (0)
Bu konuda yardima mi ihtiyaciniz var?
Ekibimiz, projenize en uygun cozumleri sunmak icin hazir.
Iletisime Gecin