performanceWordPressPerformanceSpeed

How to Speed Up WordPress: 25 Proven Techniques

How to Speed Up WordPress: 25 Proven Techniques

WordPress can be fast, but it takes work. This guide covers 25 actionable techniques to improve your site's performance, from quick wins to advanced optimizations.


Quick Wins (Do These First)

1. Upgrade Hosting

Your hosting matters more than any optimization plugin.

Hosting TypeTypical TTFBMonthly Cost
Cheap shared500-2000ms$3-10
Quality shared200-500ms$15-30
Managed WordPress100-300ms$25-50
VPS/Cloud50-200ms$20-100

Recommendation: Invest at least $25/month in hosting. Kinsta, WP Engine, Cloudways are all solid choices.

2. Use a Caching Plugin

Caching turns dynamic WordPress into static HTML (temporarily).

Top choices:

  • WP Rocket (paid) - Easiest, most effective
  • LiteSpeed Cache (free) - For LiteSpeed servers
  • W3 Total Cache (free) - Complex but powerful

Minimum settings:

  • Page cache: On
  • Browser cache: On
  • Gzip compression: On

3. Use a CDN

Serve assets from servers near your visitors.

Quick setup: Cloudflare free tier

1. Sign up at cloudflare.com

2. Add your site

3. Update nameservers

4. Done

4. Update Everything

Update these regularly:

  • WordPress core
  • All plugins
  • Your theme
  • PHP version (8.1+ recommended)

Outdated software is slower and less secure.

5. Delete Unused Plugins/Themes

Every installed plugin adds overhead:

  • Database queries
  • PHP files loaded
  • Potential conflicts

Action: Delete plugins you're not using, not just deactivate.


Image Optimization

6. Compress Images

Images are usually the largest files on your pages.

Plugins:

  • ShortPixel (best balance)
  • Imagify (simple)
  • Smush (popular free option)

Settings:

  • Compression: Lossy or Glossy (not lossless)
  • Resize large images: Max 2000px width
  • Convert to WebP: Yes

7. Use WebP Format

WebP images are 25-35% smaller than JPEG/PNG.

Automatic conversion:

  • ShortPixel converts automatically
  • Use element for fallbacks

Description

8. Implement Lazy Loading

Load images only when they enter the viewport.

Native HTML:

Description

WordPress 5.5+ adds this automatically to images in content.

9. Specify Image Dimensions

Always include width and height to prevent layout shift:

Description

10. Use Responsive Images

Serve appropriately sized images for each device:

  srcset="

image-400.jpg 400w,

image-800.jpg 800w,

image-1200.jpg 1200w"

sizes="(max-width: 600px) 400px, 800px"

src="image-800.jpg"

alt="Description">

WordPress generates these automatically for uploaded images.


Code Optimization

11. Minify CSS and JavaScript

Remove whitespace and comments from code files.

WP Rocket: Enable minify CSS and JS

Autoptimize: Free alternative

12. Defer Non-Critical JavaScript

Load JavaScript after the page is interactive:


WP Rocket: Load JS deferred option

Perfmatters: Defer JS feature

13. Remove Unused CSS

Average WordPress page loads 50-200KB of unused CSS.

Tools:

  • PurgeCSS (developer tool)
  • WP Rocket's unused CSS removal
  • Perfmatters' unused CSS removal

14. Reduce Plugin Output

Many plugins add scripts/styles on every page even when not needed.

Example: Contact Form 7 loads on every page, not just the contact page.

Fix with Asset CleanUp or Perfmatters:

  • Disable scripts on pages where not needed
  • Load conditionally

15. Optimize Fonts

Problems with fonts:

  • Multiple font files
  • Too many weights (400, 500, 600, 700...)
  • Render-blocking

Solutions:

  • Limit to 2 font families
  • Limit to 2-3 weights
  • Preload critical fonts:


Database Optimization

16. Clean the Database

WordPress databases accumulate junk:

Delete regularly:

  • Post revisions
    • Spam/trashed comments
    • Transients
    • Orphaned meta
    • Unused tables from old plugins

    Plugins:

    • WP-Optimize
    • WP Sweep
    • Advanced Database Cleaner

    17. Limit Post Revisions

    Every save creates a revision. Limit them:

    // In wp-config.php
    

    define('WP_POST_REVISIONS', 5);

    18. Optimize Database Tables

    Run OPTIMIZE TABLE periodically:

    OPTIMIZE TABLE wp_posts, wp_postmeta, wp_options;
    

    Or use WP-Optimize plugin's one-click optimization.

    19. Reduce Autoloaded Options

    WordPress loads all autoloaded options on every page load.

    Check size:

    SELECT SUM(LENGTH(option_value)) / 1024 / 1024 AS "Size (MB)"
    

    FROM wp_options

    WHERE autoload = 'yes';

    If over 1MB, you have a problem. Identify and fix large autoloaded options.


    Server Optimization

    20. Enable Gzip/Brotli Compression

    Compressed files transfer faster.

    In .htaccess:

    
    

    AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript

    Most hosts enable this by default. Check with: checkgzipcompression.com

    21. Enable Browser Caching

    Tell browsers to cache static files:

    
    

    ExpiresActive On

    ExpiresByType image/jpg "access plus 1 year"

    ExpiresByType image/jpeg "access plus 1 year"

    ExpiresByType image/png "access plus 1 year"

    ExpiresByType image/webp "access plus 1 year"

    ExpiresByType text/css "access plus 1 month"

    ExpiresByType application/javascript "access plus 1 month"

    22. Use PHP 8.1+

    Each PHP version is faster than the previous.

    Upgrade in your hosting panel. Test thoroughly after upgrading.

    23. Disable XML-RPC

    If you don't use remote publishing, disable XML-RPC:

    add_filter('xmlrpc_enabled', '__return_false');
    

    Or use a security plugin to disable.


    Advanced Techniques

    24. Preconnect to External Domains

    If you load resources from external domains, hint the browser early:

    25. Consider Full Page Caching at Edge

    Cloudflare APO ($5/month) caches full HTML pages at Cloudflare's edge.

    Result: TTFB drops from 200-500ms to 10-50ms.

    This is as close as WordPress gets to static site performance.


    Testing Your Speed

    Tools

  • PageSpeed Insights: pagespeed.web.dev
  • Key Metrics

    MetricTargetImpact
    LCP (Largest Contentful Paint)< 2.5sSEO ranking
    FID/INP (Interactivity)< 100msUser experience
    CLS (Layout Shift)< 0.1User experience
    TTFB< 200msAll other metrics

    Priority Order

    If you're overwhelmed, do these in order:

    1. ⭐ Better hosting - Foundation of speed

    2. ⭐ Caching plugin - Instant improvement

    3. ⭐ CDN (Cloudflare) - Global speed

    4. Image optimization - Often biggest gains

    5. Update PHP - Free performance

    6. Delete unused plugins - Reduce bloat

    7. Database cleanup - Maintenance

    8. Code optimization - Fine-tuning


    When Optimization Isn't Enough

    Sometimes WordPress performance hits a ceiling:

    Signs you've maxed out:

    • Still slow after all optimizations
    • Lighthouse scores stuck in 70s
    • LCP > 2.5s no matter what
    • Adding features makes it worse

    The solution: Consider modern architecture.

    Static sites on platforms like Vercel or Netlify achieve:

    • 100 Lighthouse scores common
    • TTFB under 50ms
    • No caching configuration needed
    • No database to optimize

    If you're fighting WordPress performance, it might be time to migrate.


    FAQ

    Q: Which is the best caching plugin?

    WP Rocket is easiest and most effective. LiteSpeed Cache is best for LiteSpeed servers. W3 Total Cache is free but complex.

    Q: Do I need both caching plugin AND CDN?

    Yes. Caching plugin handles page/browser cache. CDN handles geographic distribution. See our CDN setup guide →

    Q: How often should I run database cleanup?

    Monthly is fine for most sites. Weekly for high-traffic or content-heavy sites. Learn more about WordPress databases →

    Q: Will these changes affect SEO?

    Positively—faster sites rank better. Core Web Vitals are a ranking factor. See our complete SEO checklist →

    Q: What about images?

    Image optimization is often the biggest win. See our complete image optimization guide →


    Conclusion

    Speed optimization is ongoing work:

    1. Start with hosting, caching, CDN (quick wins)

    2. Optimize images (biggest files)

    3. Clean code and database (reduce bloat)

    4. Monitor and iterate

    If you've done everything and WordPress is still slow, consider whether the platform is the bottleneck. Modern static sites achieve performance that WordPress can only approach with extensive optimization.

    Related guides:

    Explore faster alternatives →

    Share:

    Related Articles

    View all

    Ready to Migrate Your WordPress Site?

    Use our free tool to export your WordPress content in minutes.

    Start Free Migration