DEV Community

devautomation
devautomation

Posted on

WordPress speed optimization: the 6 fixes that actually move the needle on client sites

Before WP-CLI, WordPress maintenance across 8 client sites meant a half-day of clicking through dashboards. Now it takes 20 minutes for all sites combined.


Why speed matters more than ever in 2025

Google confirmed Core Web Vitals are a ranking signal. A site scoring below 70 on mobile PageSpeed loses organic traffic. A 1-second delay in page load time reduces conversions by 7%.

For your clients: slow site = lost leads = unhappy client = cancelled maintenance contract.

Here are the highest-impact optimizations, in order.


Fix 1: Switch to PHP 8.2+ (biggest single win)

PHP 8.2 is 2-3x faster than PHP 7.4 for WordPress workloads. Most shared hosting still defaults to 7.4.

Check current version:

wp --allow-root eval 'echo PHP_VERSION;'
Enter fullscreen mode Exit fullscreen mode

Change in hosting panel: Hosting -> PHP Version -> 8.2 or 8.3.

Zero cost, zero plugins, zero configuration. Just flip the version. Average TTFB improvement: 200-400ms on typical sites.


Fix 2: Page caching (essential on any site)

Without caching: every visit runs PHP + database queries. 500ms-3s per request.
With caching: pre-built HTML served from disk. 20-80ms per request.

Best options by hosting type:

  • LiteSpeed servers (many CyberFolks, SiteGround): LiteSpeed Cache plugin. Free, best performance of any WP cache plugin.
  • Apache/nginx shared: W3 Total Cache or WP Super Cache.
  • Managed WP hosts (Kinsta, WP Engine): server-level cache built in -- make sure it's enabled.

Check if caching is active:

curl -I https://clientsite.com | grep -i "x-cache\|cf-cache\|cache-control\|litespeed"
Enter fullscreen mode Exit fullscreen mode

Fix 3: Image optimization (usually the biggest payload)

Most WordPress sites I audit have:

  • Hero images at 2-4MB (should be under 300KB)
  • JPEGs instead of WebP (30-50% larger)
  • Images served at 3000px displayed at 800px

Find oversized images via browser console:

document.querySelectorAll('img').forEach(img => {
  const waste = ((img.naturalWidth * img.naturalHeight) / 
    (img.getBoundingClientRect().width * img.getBoundingClientRect().height)).toFixed(1);
  if (waste > 4) console.log(`Oversized: ${img.src.split('/').pop()} -- ${waste}x too large`);
});
Enter fullscreen mode Exit fullscreen mode

Fix with ShortPixel (free tier: 100 images/month) or Imagify. Enable WebP conversion. Set lazy loading on below-fold images. Don't lazy-load above-fold images (hurts LCP).


Fix 4: Database cleanup

Slow admin panel and slow queries often come from database bloat.

-- Autoloaded data check (should be under 1MB)
SELECT SUM(LENGTH(option_value))/1024/1024 as mb 
FROM wp_options WHERE autoload = 'yes';

-- Post revisions (often thousands)
SELECT COUNT(*) FROM wp_posts WHERE post_type = 'revision';
Enter fullscreen mode Exit fullscreen mode

Quick wins:

// wp-config.php -- limit revisions going forward
define('WP_POST_REVISIONS', 5);
Enter fullscreen mode Exit fullscreen mode

Then use WP-Optimize to clean existing transients, spam comments, orphaned meta.


Fix 5: Remove render-blocking resources

PageSpeed Insights -> "Eliminate render-blocking resources" shows exactly which files are blocking the first paint.

Common offenders:

  • Contact form plugin loading scripts on every page (only needed on contact page)
  • Slider plugin loading JS/CSS globally
  • Google Fonts loaded from external CDN (adds DNS lookup)

Solutions:

  • Asset CleanUp plugin: disable specific scripts/styles on specific pages
  • Local fonts: use OMGF plugin to host Google Fonts locally
  • font-display: swap: prevents invisible text during font load

Fix 6: CDN for static assets

A CDN serves images, CSS, and JS from a server geographically close to the visitor.

Cheapest option: Cloudflare free plan. Point DNS to Cloudflare, enable "Speed" features, done. Typical improvement: 20-40% faster load times globally.

For clients already on Cloudflare: make sure "Auto Minify" is on for HTML/CSS/JS and "Rocket Loader" is enabled for JS.


The 30-minute audit flow

0-5min:   Baseline (PageSpeed + GTmetrix, 3 runs each, document scores)
5-10min:  PHP version check + TTFB measurement
10-15min: Cache headers check + caching plugin status
15-20min: GTmetrix waterfall -- find largest images
20-25min: PageSpeed "Opportunities" -- render-blocking, unused CSS/JS
25-30min: Database autoload check + revisions count
Enter fullscreen mode Exit fullscreen mode

Output: prioritized fix list with estimated impact for each item.


What I include in client reports

After every performance audit, I send:

  1. Before/after PageSpeed scores (mobile + desktop)
  2. Issues found, sorted: Critical / Important / Nice-to-have
  3. What was fixed in this session
  4. What requires additional work (and estimated time)

Clients see concrete improvement. "Your mobile score went from 42 to 71" is a tangible result.

The full audit kit with report template: WordPress Speed & Performance Audit Kit -- use SPEED for a discount.


Related articles

All paid tools: devautomation.gumroad.com


What's the performance issue you see most often on client sites -- images, caching, or something else?

Top comments (0)