WordPress performance comes down to four variables: how fast your server responds, how much data the browser has to download, how efficiently that data is cached, and how the browser renders the page. Fix all four and you get a fast site. Ignore any one of them and the others cannot compensate. This guide works through each layer in order of impact.
Step 1: Choose the Right Hosting
No amount of optimisation compensates for slow hosting. Shared hosting with oversold resources, slow disk I/O, and no object cache ceiling every other improvement you make. A page that takes 800ms to generate on a slow shared host takes 80ms on managed WordPress hosting with PHP 8.2 and a Redis object cache. The server response time (Time to First Byte, or TTFB) is the foundation everything else builds on.
For WordPress specifically, look for: PHP 8.2+, MySQL 8 or MariaDB 10.6+, Redis or Memcached object cache, SSD storage, and a CDN included or easily integrated. Managed WordPress hosts like Kinsta, WP Engine, Cloudways, and Rocket.net include these. Generic shared hosting (Bluehost, HostGator shared plans) often does not.
Test your current TTFB at web.dev/measure or using GTmetrix before and after any hosting change. A TTFB above 600ms on a simple page indicates a hosting problem that other optimisations cannot fix.
Need help optimising your WordPress site? Describe your project and get a free estimate.
Step 2: Install a Caching Plugin
WordPress generates pages dynamically – every page load runs PHP, queries the database, builds the HTML. Caching stores the finished HTML and serves it directly on repeat visits, bypassing PHP and the database entirely. The speed difference is dramatic: a cached page can load in under 100ms; an uncached page on shared hosting might take 2-3 seconds.
The best caching plugins for WordPress:
- WP Rocket – the most complete solution. Page caching, browser caching, CSS/JS minification, lazy loading, database optimisation, and CDN integration in one plugin. $59/year. Recommended for most sites.
- W3 Total Cache – free, highly configurable, but complex to set up correctly. Best for developers who want granular control.
- LiteSpeed Cache – free, excellent performance, but requires LiteSpeed server (some hosts use it, most do not).
After installing a caching plugin, verify it is working: load a page, then load it again and check the response headers in DevTools Network tab. Look for an X-Cache: HIT header indicating the cached version was served.
Step 3: Optimise Images
Images are typically 50-70% of a page’s total download size. Reducing image weight is the single highest-impact optimisation for most WordPress sites. Two changes make the biggest difference:
Convert to WebP. WebP images are 25-35% smaller than JPEG at equivalent quality and 60-80% smaller than PNG. Install ShortPixel, Imagify, or Smush. These plugins compress images on upload and serve WebP versions to browsers that support it (all modern browsers). Run the bulk optimiser on your existing media library.
Lazy load images. Images below the fold should load only when the visitor scrolls toward them, not on initial page load. WP Rocket includes lazy loading. For a free alternative, WordPress 5.5+ has native lazy loading for images – add loading=”lazy” to image tags, which WordPress applies automatically to most images.
Also set explicit width and height attributes on every image to prevent Cumulative Layout Shift (CLS), which is both a poor user experience and a Core Web Vitals metric.
Step 4: Minify and Combine CSS and JavaScript
Every CSS file and JavaScript file is a separate HTTP request. Twenty plugins each adding their own script means 20 requests before the page can render. Minification removes whitespace and comments from code files. Combination merges multiple files into one. Both reduce the number and size of requests.
WP Rocket handles this in its File Optimisation settings. Enable: Minify CSS, Combine CSS, Minify JavaScript, Defer JavaScript loading (move non-critical JS to load after page content). After enabling each option, check that your site still works visually – aggressive JS combination occasionally breaks functionality. WP Rocket’s exclusion list lets you exclude specific files that break when combined.
Step 5: Use a CDN
A Content Delivery Network (CDN) stores copies of your static assets (images, CSS, JavaScript) on servers around the world. A visitor in Tokyo gets your images served from a Tokyo CDN node rather than your server in Frankfurt, reducing latency. Cloudflare free plan provides CDN, DDoS protection, and basic caching. For more CDN control, BunnyCDN and KeyCDN offer pay-as-you-go pricing at low rates.
Step 6: Clean the Database
WordPress accumulates post revisions, transient data, orphaned metadata, and spam comments in the database over time. A cluttered database runs slower queries. WP Rocket’s Database tab or a plugin like WP-Optimize cleans these automatically. Schedule weekly or monthly cleanups. Do not delete all post revisions permanently – keep 3-5 per post for recovery purposes, delete older ones.
Measuring the Results
Test performance at PageSpeed Insights (pagespeed.web.dev) and GTmetrix before starting and after each optimisation step. Measure the same URL each time. Record: PageSpeed mobile score, TTFB, Total Blocking Time, Largest Contentful Paint, and Cumulative Layout Shift. These specific metrics show where improvements are happening and where problems remain.