/ Page Speed Fixes / Fix Page Speed in WordPress

How to Fix Page Speed in WordPress: Caching, Images, Database, CDN

WordPress is slow by default — but every major slowness pattern has a known fix. This guide walks the full speed-up workflow, in priority order: baseline measurement, caching, images, database cleaning, minification, CDN, hosting audit and theme/plugin discipline. The first three steps alone usually move a 50/100 PageSpeed score to 80+. Complete coverage also requires CLS fixes and image optimisation.

Step 1: Baseline measurement

Before any fix, record where you stand. Run three tools on five representative URLs:

PageSpeed Insights at pagespeed.web.dev — Google's official measurement, drives Core Web Vitals ranking signals. Note LCP, INP, CLS scores under mobile.

GTmetrix — waterfall view of every resource, identifies blocking resources and slow requests.

WebPageTest — multi-location testing including emerging-market connections that reveal CDN gaps.

Record TTFB (Time To First Byte) — anything over 600ms means the origin server is slow before optimisations help. Total page weight — over 3MB is heavy; over 5MB is severe. Number of requests — over 100 is fragmented and benefits from combination.

Step 2: Install a caching plugin

This single step usually delivers the biggest speed gain on WordPress — caching means PHP doesn't regenerate the page for every visitor; instead the cached HTML is served directly. Three solid choices:

WP Rocket ($59/year) — easiest setup, best out-of-box results, includes image lazy loading, database optimisation, font optimisation and CDN integration. The recommended choice if budget allows.

WP Fastest Cache — solid free version, paid version ($49.99 one-time) adds minification and image optimisation. Performs nearly as well as WP Rocket with more manual configuration.

W3 Total Cache — free, extremely powerful, complex. Best for advanced users running their own server with Redis/Memcached. Wrong choice for beginners.

Whichever you pick: enable page caching, browser caching, GZIP compression. Test every page type after enabling — caching sometimes breaks logged-in user experiences (cart pages, account pages, dynamic content). Add exclusions for those URLs.

Step 3: Optimise images

Images are 50-70% of page weight on most WordPress sites. The image-specific workflow (bulk compression, WebP conversion, srcset verification, lazy loading, CDN delivery) is covered in detail in Fix Images in WordPress. Quick summary: install ShortPixel or Smush, bulk-compress, enable WebP, verify srcset works, confirm native lazy loading on below-fold images.

Step 4: Clean the database

Active WordPress sites accumulate database bloat: post revisions, transients (expired and unexpired), spam comments, orphaned post meta, draft auto-saves. On a 3-year-old blog this can mean 60% of database size is junk.

Install WP-Optimize (free) or use WP Rocket's built-in database tab. Run:

Before running: back up the database. Database cleaning is mostly safe but disasters happen. Limit future revisions via wp-config.php:

define('WP_POST_REVISIONS', 5);
define('AUTOSAVE_INTERVAL', 300);

Step 5: Minify and combine CSS/JS

Most caching plugins include this. Be cautious — minification can break things. Enable in stages:

Minify CSS first. Almost always safe. Re-test every page type after enabling.

Minify JS next. Sometimes breaks third-party scripts (analytics, chat widgets, payment processors). Test analytics fires, test form submissions, test e-commerce checkout.

Combine JS last (or skip). Combines many small JS files into one — fewer HTTP requests. Frequently breaks page builders and dynamic features. With HTTP/2 and HTTP/3 the benefit of combining is reduced anyway; many performance experts now recommend skipping JS combination entirely.

⚠ After enabling any minification, run a full site-test pass: every template type, mobile and desktop, logged-in and logged-out. Set up Slack alerts for JS errors via a tool like Sentry to catch regressions.

Step 6: Add a CDN

A Content Delivery Network serves static assets (images, CSS, JS) from edge servers close to visitors, reducing latency. International audiences see the biggest benefit.

Cloudflare (free) — sign up, change nameservers, enable orange-cloud proxy on www. Activate Brotli compression, HTTP/3, Rocket Loader (test it doesn't break anything), Mirage and Polish for image optimisation. Cloudflare APO plug-in ($5/month) further caches HTML at the edge.

BunnyCDN — $1/month base, faster than Cloudflare in some regions, simple URL-rewrite via plugin.

Either way, configure your caching plugin to rewrite asset URLs to the CDN domain. Test image and CSS URLs in view-source to confirm they're pointing at the CDN, not your origin.

Step 7: Audit hosting and theme

If TTFB exceeds 600ms even after caching and CDN, hosting is the bottleneck. Hosting tier matters more than most WordPress site owners realise:

Theme choice matters but less than commonly believed. Lightweight themes (GeneratePress, Astra, Blocksy) load faster out of the box but a well-tuned heavy theme can outperform a poorly-configured lightweight one. The 80/20: pick a reputable lightweight theme, then optimise plugins.

Plugin discipline is critical. Audit every plugin annually: which are essential, which are nice-to-have, which haven't been updated in 2+ years (security risk + likely slow). Aim for under 25 active plugins; over 40 plugins is a red flag.

Step 8: Re-measure and iterate

After each batch of changes, re-run PageSpeed Insights and GTmetrix. Compare against your baseline. Target: LCP under 2.5 seconds, INP under 200ms, CLS under 0.1. Field data (real-user CrUX metrics) takes 4-6 weeks to update. Re-test monthly because plugin updates regress performance.

💡 Build a tracking sheet: date, page tested, LCP, INP, CLS, TTFB, total weight. Re-test after every major plugin/theme update. You'll quickly see which updates regress performance and which improve it.

Frequently Asked Questions

Which WordPress caching plugin is best?
WP Rocket if budget allows ($59/year): best results out of the box, minimal configuration. WP Fastest Cache for free option that performs nearly as well. W3 Total Cache is powerful but complex — only use if you understand reverse proxies and database caching. Avoid stacking multiple caching plugins; they conflict and produce slower results than any single one.
How much speed difference does hosting make?
Massive. Shared hosting (SiteGround, Bluehost) typically delivers 600-1200ms TTFB. Managed WordPress hosting (Kinsta, WP Engine, Pressable) delivers 200-400ms TTFB on the same site. A well-tuned VPS (Hetzner, DigitalOcean droplet) can hit 100-200ms. If your TTFB exceeds 800ms after enabling caching, hosting is the bottleneck.
Should I minify CSS and JS?
Yes, but cautiously. Minify CSS — almost always safe. Minify JS — sometimes breaks third-party scripts (analytics, ads, chat widgets). Combine JS into one file — frequently breaks page-builder functionality, payment forms, dynamic features. Enable in stages: minify CSS, test; minify JS, test; combine JS, test extensively before declaring done.
Will switching from shared hosting to a CDN fix speed?
Partially. A CDN serves static assets (images, CSS, JS) from edge locations, reducing latency for international visitors. But the initial HTML page response still comes from your origin — if shared hosting takes 800ms to generate that HTML, the CDN doesn't help the first paint. CDN + better hosting is the full fix.
How often should I clean the WordPress database?
Monthly for active sites. Schedule WP-Optimize with auto-cleanup of: post revisions older than 30 days (or limit to 5 per post via wp-config.php), transients expired more than 7 days ago, spam and trashed comments older than 30 days, orphaned post meta. Don't auto-delete drafts or pending comments — humans need those.

⚡ Audit your WordPress speed first

Get LCP, INP, CLS and TTFB measurements with specific fix recommendations.

Run Page Speed Analyzer →
Related Guides: Page Speed Guide  ·  All Page Speed Fixes  ·  Fix Images in WordPress  ·  Fix CLS in WordPress
💬 Got a problem?