WordPress performance advice falls into two camps: “install this plugin” and “rewrite your entire stack.” Neither helps when your site is slow and you need to fix it today. This guide focuses on the changes that produce measurable improvements, in order of impact.

Measure first (always)

Before optimising, establish a baseline. Use these tools:

  • PageSpeed Insights — Google’s tool, measures Core Web Vitals
  • GTmetrix — waterfall view of what loads when
  • Query Monitor plugin — shows slow queries, hooks, and HTTP requests on every page

The fastest way to find the bottleneck:

// In wp-config.php temporarily
define('SAVEQUERIES', true);

Then check Query Monitor to see which queries are slow. You will often find one plugin running 47 queries on every page load.

The optimisation order (by impact)

1. Page caching (biggest impact)

Page caching stores the fully rendered HTML of each page. Instead of running PHP + database queries on every request, the cached HTML is served directly.

Options:

  • Nginx FastCGI cache — best performance, no plugin overhead
  • Cloudflare APO — caches HTML at the edge ($5/month)
  • WP Rocket — premium plugin, excellent page caching
  • W3 Total Cache — free, powerful, complex configuration
  • Super Page Cache for Cloudflare — free, integrates with Cloudflare CDN

For Nginx FastCGI cache:

# In nginx.conf, inside http block
fastcgi_cache_path /var/cache/nginx/fastcgi levels=1:2 keys_zone=WORDPRESS:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";

# In the PHP location block
fastcgi_cache WORDPRESS;
fastcgi_cache_valid 200 60m;
fastcgi_cache_bypass $skip_cache;
fastcgi_no_cache $skip_cache;

# Skip cache for logged-in users and specific pages
set $skip_cache 0;
if ($http_cookie ~* "wordpress_logged_in") { set $skip_cache 1; }
if ($request_uri ~* "/wp-admin/|/cart/|/checkout/|/my-account/") { set $skip_cache 1; }

2. Object caching (Redis)

WordPress stores options, transients, and other data in the database. Object caching moves this to memory:

apt install redis-server php8.3-redis

Install the Redis Object Cache plugin. Enable it. Your database query count will drop by 30-70%.

3. Image optimisation

Images are the largest asset on most pages. Optimise them:

# Bulk optimise existing images with wp-cli and a plugin
wp media regenerate --yes

# Convert to WebP for modern browsers
# Plugins: WebP Express, Imagify, ShortPixel

4. Database cleanup

WordPress accumulates cruft:

# Remove post revisions
wp post delete $(wp post list --post_type='revision' --format=ids) --force

# Delete expired transients
wp transient delete --expired

# Remove spam and trashed comments
wp comment delete $(wp comment list --status=spam --format=ids) --force
wp comment delete $(wp comment list --status=trash --format=ids) --force

# Optimise tables
wp db optimize

Set up automatic cleanup:

// Limit post revisions
define('WP_POST_REVISIONS', 5);

// Control trash emptying
define('EMPTY_TRASH_DAYS', 7);

5. Plugin audit

The average WordPress site runs 20+ plugins. Many do almost nothing useful. Audit yours:

# List active plugins
wp plugin list --status=active --field=name

# For each one, ask:
# - When did I last use its functionality?
# - Can a few lines of code replace it?
# - Does it load assets on every page?

Common offenders that load on every page unnecessarily:

  • Social sharing plugins (use native share API)
  • Slider plugins (use a static hero image)
  • Page builder plugins on non-builder pages

What does NOT help much

Minification of CSS/JS: The impact is usually under 5%. WP Rocket or Autoptimize handle this automatically — set it and forget it.

Lazy loading: Native lazy loading (loading="lazy" on images) is built into WordPress since 5.5 and modern browsers.

CDN for a single-region audience: If all your visitors are in one country, a CDN adds latency, not reduces it. CDNs help global audiences.

Changing PHP versions for “speed”: PHP 8.3 is about 15% faster than 8.1, but this only helps uncached requests. If you have page caching, PHP version does not affect page load time.

The cash-to-performance ratio

If you pay for hosting, this is roughly the performance hierarchy:

Monthly spendWhat you getPerformance level
$5-10Basic VPS, no Redis, no page cacheAcceptable for low traffic
$15-25VPS with Redis, page caching configuredFast for most sites
$30-60Managed WordPress hostingFast + support handles config
$60-150+Dedicated or high-end managedFast + high availability

The biggest performance jump is from $10 to $25. Beyond that, diminishing returns.

When to stop optimising

If your site loads in under 2 seconds and Core Web Vitals pass, stop. Further optimisation is diminishing returns. Focus on content and users instead of chasing a perfect Lighthouse score.

The one exception: if you run an ecommerce site (WooCommerce), every 100ms of load time affects conversion rates. In that case, keep optimising until the checkout flow is under 1 second.