How to Speed Up WordPress: A Measured Approach
Measure first
Run a test from a location close to your real audience and record three numbers: TTFB, Largest Contentful Paint and total page weight. TTFB above 600 ms points at the server, PHP or database. A fast TTFB with a slow LCP points at images, fonts and render-blocking scripts.
Test the homepage, a content page and a category or shop archive — they behave very differently, and optimising only the homepage is why many sites still feel slow.
Caching, in layers
- Page cache — stores complete HTML. The single biggest win. On LiteSpeed servers, enable LSCache so pages are served by the web server without touching PHP.
- Object cache — caches database query results in memory (Redis or Memcached). Essential for WooCommerce and membership sites where pages cannot be fully cached.
- OPcache — caches compiled PHP bytecode. Enabled at server level.
- Browser cache — long expiry headers on static assets so returning visitors download almost nothing.
- CDN — offloads images, CSS and JS to edge locations near the visitor.
Images: the biggest easy win
- 1 Resize before upload — no 4000px photograph in a 1200px container.
- 2 Serve WebP or AVIF with automatic conversion.
- 3 Enable lazy loading for below-the-fold media, but exclude your hero image so LCP is not delayed.
- 4 Set explicit width and height attributes to eliminate layout shift.
- 5 Compress existing library images in bulk once, then keep the workflow consistent.
Database and asset hygiene
- Limit post revisions and delete accumulated ones; large sites often carry tens of thousands.
- Clear expired transients and orphaned metadata regularly.
- Remove unused plugins and themes entirely rather than deactivating them.
- Defer non-critical JavaScript, and stop loading page-builder CSS on pages that do not use it.
- Self-host fonts with font-display: swap and subset to the characters you actually need.
- Disable emoji scripts, embeds and dashicons on the front end if unused.
Configuration snippets
// wp-config.php
define( 'WP_POST_REVISIONS', 5 );
define( 'AUTOSAVE_INTERVAL', 300 );
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'DISABLE_WP_CRON', true ); // then add a real server cron every 5 minutesReplacing WP-Cron with a real server cron job removes a background task from every page load on low-traffic sites and makes scheduling reliable on busy ones.
When optimisation is not the answer
If TTFB stays high after full-page caching, you have a hosting or architecture limit rather than a plugin problem: shared CPU contention, an oversized database, or an admin-heavy workload that cannot be cached. That is the point to move to a VPS with dedicated vCPU, Redis and a tuned LiteSpeed stack.
Frequently asked questions
Which cache plugin is best on HostBotics?
LiteSpeed Cache, because our servers run LiteSpeed and the plugin drives the server-level cache directly instead of caching in PHP.
Does a CDN replace caching?
No. A CDN shortens distance; page caching removes work. You want both, and caching first.
Need a hand applying this?
Our engineers can do it for you. Open a ticket and we will help.