How to speed up a WordPress site?

Check the speed first with PageSpeed Insights or GTmetrix, find the slow part, and then fix it. The most useful steps are:

  1. Good hosting and a recent PHP version (PHP 8.3 or newer is recommended by WordPress.org).
  2. Page caching with a plugin (LiteSpeed Cache, WP Super Cache) or the cache of your host.
  3. Optimize the images: resize them, use WebP or AVIF, and lazy loading (WordPress adds loading="lazy" by itself).
  4. A light theme and fewer, better plugins. Remove what you do not use.
  5. Use a CDN for static files.
  6. Object cache (Redis or Memcached) for sites with a lot of database work.
  7. Clean the database: remove old revisions, spam comments and expired transients. Limit revisions with WP_POST_REVISIONS.
  8. Load scripts only where needed and keep the number of requests small.
Terminal output

$ wp plugin list –status=active –format=count
0
$ wp transient delete –expired
Success: No expired transients found.
$ wp post list –post_type=revision –format=count
0

Measure again after every change, so you know what really helped.


Learn more about the similar topics:
Tutorials
No Content Found.
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.