WordPress Site Optimization for Google PageSpeed: A Core Web Vitals Guide

by /

Page load speed is one of the most important factors affecting user experience (UX), conversion rate, and Google search rankings. Google PageSpeed Insights (PSI) uses Core Web Vitals (CWV) metrics to measure real-world performance.

A step-by-step guide to optimizing a WordPress site for Google PageSpeed: hosting, caching, CSS/JS, images, and fixing LCP, INP, and CLS issues.  Starosta Agency

This article will help you figure out exactly how to optimize your WordPress site to score well on PageSpeed and meet Google’s modern requirements.

The basics: measuring and understanding Core Web Vitals

Core Web Vitals are a set of metrics that measure a page’s loading speed, interactivity, and visual stability.

A step-by-step guide to optimizing a WordPress site for Google PageSpeed: hosting, caching, CSS/JS, images, and fixing LCP, INP, and CLS issues.  Starosta Agency

LCP (Largest Contentful Paint) — loading speed

The LCP metric measures how long it takes for the largest visible content element on the screen to render (for example, a heading, a large image, or a block of text). A low LCP is key to keeping users on the page.

INP (Interaction to Next Paint) — interactivity

INP (which replaces FID) measures the time between a user’s interaction (a click or tap) and the moment the browser visually responds to that action. This is critical for forms, buttons, and navigation.

CLS (Cumulative Layout Shift) — visual stability

CLS measures unexpected visual shifts of elements on the page while it loads. A high CLS is frustrating — elements (like buttons) “jump around,” causing users to click the wrong thing.

Stage 1: Optimizing hosting and caching (server level)

Performance improvements don’t start with code — they start with the foundation: your server.

Choosing fast hosting

High-performance hosting (especially Managed WordPress Hosting or a VPS/dedicated server) is the first and most effective investment you can make. Make sure your hosting supports modern technology:

  • PHP 8.x (significantly faster than older versions).
  • SSD storage.
  • HTTP/2 or HTTP/3 protocols.

Setting up caching and Gzip/Brotli

Caching lets you store copies of pages so they don’t need to be regenerated on every request.

  • Server-side caching: If your hosting doesn’t provide it, use plugins such as WP Rocket, WP Super Cache, or LiteSpeed Cache.
  • Browser caching: Configure your .htaccess file to tell browsers how long to keep static files (images, CSS, JS) cached.
  • Gzip/Brotli: Enable server-side compression (usually via your hosting settings or .htaccess), which shrinks HTML, CSS, and JS files by 3-7x.

Using a CDN (Content Delivery Network)

A CDN is a network of servers distributed around the world that store copies of your static content. It speeds up content delivery to users, since they get it from the nearest server, which significantly reduces LCP.

Stage 2: Front-end optimization (code and assets)

These steps directly target improving your LCP and INP metrics.

Minifying CSS and JavaScript (removing render-blocking resources)

Render-blocking CSS and JS force the browser to wait before it can start painting the page, which hurts LCP.

  • Minification: Strip out unnecessary whitespace, comments, and line breaks from CSS/JS (using a plugin like Autoptimize or WP Rocket).
  • Removing render-blocking:
    • Inlining critical CSS: Embed the small amount of CSS needed to render the above-the-fold content directly in the HTML file’s <head>.
    • Async/defer: Load the rest of your JS scripts asynchronously (async or defer) so they don’t block the page’s main render.

Lazy loading images and video

Lazy loading ensures that images and videos located “below the fold” (that is, not visible when the page first loads) only load once the user scrolls down to them. This significantly speeds up LCP.

Optimizing fonts and images

  • Images:
    • Use modern formats such as WebP (plugins like Smush or Imagify can convert and compress them automatically).
    • Set width and height attributes on images to avoid CLS.
  • Fonts: Use font-display: swap in your CSS so the browser temporarily shows a system font while your main font loads (this avoids blocking the render).

Stage 3: Keeping WordPress and the database lean

Over time WordPress accumulates clutter, which slows down request processing and hurts INP.

Choosing a lightweight theme and plugins

A heavy or poorly coded theme is the main cause of slow performance. Choose optimized themes (GeneratePress, Astra, Hello Elementor).

  • Plugin audit: Remove any unused or outdated plugins. Fewer plugins means less code to process.
  • Load scripts on demand: Use tools to disable specific plugins’ CSS/JS on pages where they aren’t needed.

Database optimization

The WordPress database accumulates a lot of clutter: post revisions, spam comments, temporary data.

  • Clean your database regularly (using plugins like WP-Optimize or WP Rocket). This reduces server response time and improves overall speed.

Summary: your PageSpeed checklist

A step-by-step guide to optimizing a WordPress site for Google PageSpeed: hosting, caching, CSS/JS, images, and fixing LCP, INP, and CLS issues.  Starosta Agency

To hit high scores on Google PageSpeed (90+), do the following on a regular basis:

  1. Hosting: Make sure you’re running a fast PHP version on capable hosting.
  2. Caching: Install a single, quality caching plugin (WP Rocket, LiteSpeed Cache).
  3. Images/media: Compress them, use WebP, and set up lazy loading.
  4. Code: Minify CSS/JS and eliminate render-blocking resources.
  5. Testing: After every change, check the site in Google PageSpeed Insights and monitor Core Web Vitals in Google Search Console.
author avatar
Yurii Starosta CEO & Founder Starosta Agency
Yurii Starosta is an SEO specialist and web developer, and the founder of Starosta Agency. He focuses on technical SEO, growth for B2B and eCommerce projects, and building websites designed to bring in clients. He has hands-on experience in legal services, manufacturing, logistics, the beauty sector and online stores. Combining SEO strategy with web development lets him deliver end-to-end solutions — from site architecture through to CRM and payment system integration. He writes on SEO, technical optimisation and digital marketing, and measures his work by business outcomes: organic traffic, conversions and sales.