DEV Community

brown97 loong
brown97 loong

Posted on

How I Cut My WordPress Load Time from 8.7s to 1.8s (Real Case Study)

Back in 2018, I ran a content site doing 500K page views/month — and made almost nothing from AdSense.

I thought it was a content problem. It wasn't. It was 8.7 seconds of load time. By the time the page finished loading, users had already left, and ads never finished rendering.

Here's exactly what I did to fix it.


Step 0: Diagnose First, Don't Guess

Most people jump straight to installing caching plugins. Wrong order.

Look at the red items. Fix the worst ones first. Always test mobile AND desktop — Google uses mobile-first indexing, and mobile scores are almost always 20–30 points lower.


Step 1: Fix Your Hosting

Shared hosting is a silent killer. In 2019 I ran several image sites on shared hosting; at 10K daily visitors, TTFB hit 2+ seconds regularly.

After switching to a VPS (Cloudways), TTFB dropped to under 200ms.

Quick wins:

  • Move to VPS if you're still on shared hosting (Hostinger, Vultr, Cloudways are all solid)
  • Pick a server region close to your target audience
  • Upgrade PHP to 8.0+ immediately — it's a free performance gain that many older sites skip

Step 2: Fix Your Images (This Alone Fixes 70% of Cases)

Images are responsible for slow performance on most WordPress sites. People upload raw 5MB JPGs and wonder why their page weighs 8MB.

Convert to WebP. After migrating one of my content sites, total page size dropped from 4.2MB → 1.8MB, and load time improved by ~1 second instantly.

I use Imagetrix to batch convert — free, no login required.

Other image rules I follow:

  • Max width: 1200px for article images
  • Max file size: under 200KB per image
  • Compress before upload: Imagetrix compressor handles this well
  • Enable lazy loading (WP Rocket or native WordPress, but verify it's actually working in DevTools)

Step 3: Set Up Caching

This is where you get the biggest speed jump.

Caching pre-generates static HTML so WordPress doesn't run PHP + database queries on every request.

My current stack:

  • WP Rocket ($59/yr) — page cache, browser cache, minification, lazy loading, preloading all in one. Worth every dollar.
  • Budget alternative: LiteSpeed Cache (free, excellent if your host runs LiteSpeed) or W3 Total Cache

⚠️ WooCommerce note: Exclude cart and checkout pages from caching — caching these breaks them.


Step 4: Add a CDN

CDN serves your static files (images, CSS, JS) from nodes closest to each user.

My setup: Cloudflare free tier for everything. Change your nameservers, enable proxy mode, done — about 10 minutes.

Bonus: you also get DDoS protection, free SSL, and bot filtering.

For sites with heavy Asian traffic, BunnyCDN has better node coverage and is very cheap (pay-per-GB).


Step 5: Code-Level Cleanup

Remove Unused Plugins (Delete, Not Disable)

Every plugin loads extra CSS/JS. Disabled plugins still exist on disk and some themes still load their assets. Delete what you don't use.

Minify + Defer JS

  • Enable CSS/JS minification via WP Rocket or Autoptimize
  • Be careful with JS merging — it can break things, test individually
  • Enable "Delay JavaScript execution" in WP Rocket — this usually boosts PageSpeed score significantly

Step 6: Clean Your Database

After years of running, WordPress accumulates post revisions, spam comments, and stale transient data.

One of my 6-year-old sites had 40,000+ revision records. After cleanup with WP-Optimize (free), database query speed improved ~30%.

Set it to auto-clean weekly. Done.

If your host supports Redis, configure Redis object caching — major win for DB-heavy sites.


The Result

For that 2018 site that loaded in 8.7 seconds:

Action Impact
Switched to Cloudways VPS TTFB: 2.1s → 0.18s
Converted all images to WebP Page size: -58%
Installed WP Rocket Full page caching enabled
Added Cloudflare CDN Global static asset delivery
Cleaned DB + removed 30+ plugins Query speed +30%

Final result: 1.8 second load time. PageSpeed mobile score: 31 → 95.


Takeaway

Performance optimization isn't a one-time task — it's an ongoing process. But the order matters:

  1. Measure first
  2. Fix hosting
  3. Fix images
  4. Add caching
  5. Add CDN
  6. Clean up code and database

Speed alone won't save bad content, and great content can't overcome 8-second load times. You need both.


Tools I use for image optimization: Imagetrix.app — free WebP conversion, compression, resizing, and more.``

Top comments (0)