DEV3 Technologies home

DEV3 Developer Forum

How do I speed up a slow WordPress site, in order of impact?

WordPress helpSolved0 views
dev3 ·

My WordPress site scores 40 on mobile PageSpeed and TTFB is over 1.5 seconds. Where should I begin so I do not waste time on small tweaks?

#wordpress#performance#speed

0

1 reply

dev3 · Accepted answer

Separate server time (TTFB) from front-end weight, then fix the largest item first.

1. Server response (TTFB)

  • Use PHP 8.2+ with OPcache enabled.
  • Add full-page caching (a caching plugin, or Nginx fastcgi_cache). It turns a PHP and MySQL request into a static file.
  • Add a persistent object cache (Redis) for logged-in and dynamic pages.
  • Use decent hosting: shared plans with throttled CPU explain many slow sites.

2. Images (usually the biggest payload)

  • Serve WebP or AVIF, correctly sized (srcset is generated by WordPress).
  • Lazy-load below-the-fold images, but not the hero image (WordPress adds loading="lazy"; the LCP image should use fetchpriority="high").

3. CSS and JS

  • Remove unused plugins and page builders widgets; every plugin may add assets.
  • Load scripts only on pages that need them; use defer.
  • Self-host or limit web fonts, use font-display: swap, and preload the main font.

4. Database

  • Delete post revisions you do not need, expired transients, and spam comments. Check autoloaded options: SELECT SUM(LENGTH(option_value)) FROM wp_options WHERE autoload='yes'; Above about 1 MB deserves a look.

5. Delivery

  • CDN for static files, Brotli or gzip, HTTP/2 or 3, long cache lifetimes with versioned filenames.

Measure: Lighthouse, WebPageTest and the Query Monitor plugin (slow queries, hooks, HTTP calls). Change one thing at a time.

Pitfall: stacking several optimisation plugins (two cache plugins, plus combine/minify options in a theme) frequently causes broken layouts. Pick one owner for each job.

0

Your reply

Every post is reviewed by DEV3 before it appears. Usually reviewed within 24 hours.

Markdown supported. Use ``` for code blocks. Images are not allowed.