These methods are ordered by impact. The first three deliver the biggest improvements for almost every site. Measure TTFB after each change before moving to the next, so it’s clear which fix actually helped.
1. Migrate to managed or container-based hosting
Hosting sets the maximum performance ceiling for any WordPress site. Caching, CDNs, and PHP optimization all sit on top of the hosting layer. When the foundation is weak, layered optimizations deliver smaller and smaller returns.
Shared hosting is built around resource sharing by design. Hundreds of accounts on one server compete for CPU and RAM. Managed WordPress hosting solves this by allocating dedicated resources per account. Container-based platforms like Rocon take it further, isolating each site in its own container with dedicated CPU and RAM. That eliminates the noisy neighbor problem entirely.
Migration from shared to managed or container hosting typically reduces TTFB by 50 to 70 percent. Hosts commonly evaluated for serious WordPress workloads:
| Provider |
Type |
TTFB tier |
Pricing |
| Rocon |
Container managed |
Under 200 ms |
From $1.99/mo, locked at renewal |
| Kinsta |
Premium managed |
Under 200 ms (premium tier) |
From $35/mo |
| WP Engine |
Managed |
200 to 300 ms |
From $20/mo |
| Cloudways |
Managed cloud |
200 to 300 ms |
From $11/mo |
| SiteGround |
Shared (LiteSpeed) |
220 ms (Cybernews 2026) |
From $2.99/mo |
| Rocket.net |
Cloudflare Enterprise |
Under 200 ms |
From $30/mo |
2. Enable full page caching
Page caching is the single highest-impact change available without changing hosts. The mechanism is simple. Instead of regenerating a page on every visit, the server stores a pre-built HTML version and serves that directly. PHP doesn’t run. The database isn’t queried.
Most managed WordPress hosts include caching by default. Sites on hosts without built-in caching can use one of these plugins:
- WP Rocket. Premium plugin bundling page caching, lazy loading, and database optimization. Around $59/year for one site.
- LiteSpeed Cache. Free, performs best on hosts using LiteSpeed servers natively.
- FlyingPress. Modern caching plugin with strong critical CSS handling.
- W3 Total Cache. Free with extensive options for advanced users.
| WooCommerce caching warning
WooCommerce sites need careful caching configuration. Cart, checkout, and account pages must be excluded from caching to prevent serving stale or incorrect content. Most caching plugins handle these exclusions automatically, but the configuration should always be verified after activation. Test the cart and checkout flow as a real customer before declaring the cache configured. |
3. Configure Cloudflare APO or equivalent edge HTML caching
This is where many WordPress optimization guides stop short. A standard CDN configuration only caches static assets like images, CSS, and JavaScript. The HTML page itself still has to travel from the origin server to every visitor, and HTML response time is exactly what TTFB measures.
Edge HTML caching changes that. The full HTML response gets cached at edge locations close to visitors. The origin server doesn’t get hit for cached pages. Two configurations are worth knowing:
- Cloudflare Automatic Platform Optimization (APO). WordPress-specific Cloudflare service that caches HTML at the edge. Cloudflare’s published testing on 505 WordPress sites measured a 72 percent reduction in TTFB at the 90th percentile. APO costs $5 per month on the Cloudflare Free plan and is included on Pro plans and above.
- Cloudflare Argo Smart Routing. Add-on that routes requests across Cloudflare’s optimized network instead of the public internet. Best for dynamic pages that can’t be edge-cached, like ecommerce checkout flows.
- QUIC.cloud. LiteSpeed-native CDN with full HTML caching. Free tier available, paid plans add edge caching.
- Bunny.net Edge Caching. Lower-cost alternative to Cloudflare APO with similar full HTML caching.
Cloudflare’s free plan still helps with DNS speed and basic caching, but the gains are smaller without APO. For sites with global audiences, APO usually pays for itself within the first month through reduced bounce rates.
4. Upgrade to PHP 8.3 or PHP 8.4
PHP versions older than 8.2 no longer get active support. PHP 8.3 is the current production-ready release with active support through December 2026. PHP 8.4 hit stable in November 2024 and works for most production WordPress workloads.
Performance gains vary by workload. Kinsta’s December 2025 benchmark on identical WordPress installations measured the following:
- Plain WordPress: approximately 6.6 percent more throughput from PHP 7.4 to PHP 8.x.
- WooCommerce: approximately 21 to 23 percent more throughput from PHP 7.4 to PHP 8.x.
- Custom applications: varies based on code patterns. Workloads that benefit from JIT compilation see larger gains.
PHP version changes are usually one click in the hosting dashboard. Before switching, verify themes and plugins support PHP 8.3, take a backup, and test in staging. About 5 percent of sites encounter PHP 8.3 incompatibilities, almost always in unmaintained plugins that should be replaced anyway.
5. Enable Redis object caching
Page caching helps with cacheable pages. Object caching helps with the parts that aren’t cacheable, like logged-in pages, the WordPress admin, and dynamic content. It stores expensive database query results in memory, so repeated identical queries don’t hit the database again.
WooCommerce sites benefit a lot, since every page load runs queries for product data, pricing, inventory, and tax rules. Redis is the standard. Memcached is a close alternative.
Most managed WordPress hosts enable Redis through a single dashboard setting. On hosts without managed Redis, support can usually enable it on request. Object caching typically reduces database load by 30 to 60 percent on dynamic sites.
6. Optimize the database and reduce autoload size
Database optimization handles two separate issues. The first is general bloat: post revisions, expired transients, spam comments, orphaned plugin tables. The second is autoloaded data, which loads on every page request whether it’s needed or not.
WP Engine recommends keeping autoload size under 800 KB. Sites running popular plugins like Yoast, Elementor, or social plugins regularly hit 3 to 5 MB of autoload, which slows every page load. Two plugins handle both cleanup jobs reliably:
- WP-Optimize. Free, with scheduled cleanup options.
- Advanced Database Cleaner. Free, with detailed control over cleanup operations and orphaned table identification.
After the initial cleanup, schedule weekly automated optimization. Performance stays stable without manual intervention.
7. Replace wp-cron with a real cron job
WordPress uses wp-cron to fire scheduled tasks like publishing posts, sending emails, and running plugin schedulers. The catch is wp-cron only runs when someone visits the site. On busy stores, this triggers extra work on every page load. On quiet sites, scheduled tasks miss their windows.
The fix is to disable wp-cron in wp-config.php and replace it with a server-level cron job that runs every 5 to 15 minutes. Most managed WordPress hosts handle this automatically. Self-managed hosts need a one-line config change plus a cron entry.
8. Tune the WordPress Heartbeat API
The Heartbeat API sends background requests every 15 to 60 seconds for autosave, login expiration checks, and dashboard updates. On busy sites, these requests pile up. Tuning is simple:
- Frontend: disable entirely on pages where autosave isn’t needed.
- Post editor: reduce frequency to 60 seconds.
- Dashboard: reduce frequency to 60 seconds.
Configurable through Perfmatters, WP Rocket, or the free Heartbeat Control plugin.
9. Block aggressive bot traffic
Cloudflare’s Bot Fight Mode and Super Bot Fight Mode catch known bot patterns automatically. The free plan includes basic protection. Pro and Business plans add enhanced bot management.
Sites without Cloudflare can use Wordfence Premium or Solid Security. Both detect and block common bot signatures at the application layer. Internal Rocon production data shows blocking aggressive bots typically reduces PHP worker usage by 30 to 50 percent during peak hours.
10. Switch to a lightweight theme
Theme weight directly affects server processing time. Themes loading multiple JavaScript libraries, complex page builder frameworks, and excessive stylesheets increase the work needed to generate each page. Themes commonly recommended for performance-focused sites:
- GeneratePress: Minimal codebase, strong benchmarks, large community.
- Astra: Widely deployed, good page builder integration.
- Kadence: Modern feature set, optimized performance.
- Blocksy: Block-first design, lightweight footprint.
Sites running heavy themes that can’t be replaced should at minimum disable unused features, animations, and bundled plugins to reduce overhead.
11. Enable Brotli compression instead of Gzip
Compression reduces the size of HTML, CSS, and JavaScript responses, which lowers transfer time. Gzip has been the standard for years. Brotli is the newer alternative, typically delivering 15 to 25 percent better compression than Gzip on text content.
Most modern hosts support Brotli, but it isn’t always enabled by default. Check the hosting dashboard or ask support. Cloudflare automatically applies Brotli when the visitor’s browser supports it. Note that compression mainly improves overall page download time, not pure TTFB. The gain shows up in Core Web Vitals scores.
12. Enable TLS 1.3
TLS 1.3 reduces the round trips needed to establish an HTTPS connection. Compared to TLS 1.2, it typically saves 100 to 250 ms on initial connection setup, depending on geographic distance between client and server.
Most modern hosts and CDNs enable TLS 1.3 by default. Sites still using TLS 1.2 should ask support to enable it. The change is server-side and takes minutes.
13. Use a high-performance DNS provider
DNS resolution is the first step in serving any web request. Slow DNS adds latency before anything else can happen. DNSPerf publishes ongoing benchmarks comparing DNS providers globally. Cloudflare DNS and Google Public DNS consistently lead the rankings.
Registrar-default DNS is often significantly slower than dedicated providers. Migrating DNS to Cloudflare typically saves 20 to 100 ms per visitor on initial page load. The migration is done by changing nameservers at the domain registrar and usually takes 5 to 10 minutes.
14. Add auto-scaling for traffic events
Fixed-capacity hosting plans struggle during traffic spikes. When request queue depth exceeds available PHP workers, TTFB rises sharply. Auto-scaling adds capacity automatically during traffic events, keeping response times stable.
Auto-scaling is built into Rocon’s container architecture, Cloudways managed cloud hosting, Kinsta, and major cloud platforms like AWS and Google Cloud. Costs go up during scale-up events but stay proportional to traffic volume. For most sites, the trade-off is worth it during sales events, viral posts, or campaign launches.
Leave a Reply