Back to Blog

How to Speed Up a Website: Core Web Vitals Guide

How to speed up a website: Core Web Vitals (LCP, INP, CLS), measuring speed, image optimization, caching, CDNs, server response time and WordPress tips.

Nodesty Team5 min readHosting
The words Site Speed with LCP, INP and CLS on a dark Nodesty background

Speeding up a website means all the work you do so that your pages open faster, respond to visitors' clicks more quickly and don't jump around while they load. A fast site keeps more visitors, brings in more sales and does better on Google's page experience signals. The good news: most of the gains come from a few basic steps.

This guide covers the Core Web Vitals metrics, how to measure your site's speed and the most effective ways to speed it up, from images and caching to CDNs and server response time.

What are Core Web Vitals?

Google evaluates a page's user experience with three metrics:

MetricWhat it measuresGood value
LCP (Largest Contentful Paint)When the largest content on the page appears2.5 s or less
INP (Interaction to Next Paint)How quickly clicks and taps get a response200 ms or less
CLS (Cumulative Layout Shift)How much the content shifts while the page loads0.1 or less

On top of these, TTFB (Time to First Byte), meaning how long the server takes to send the first byte, is the starting point for all the metrics. If the server responds slowly, other optimizations can't make up for it.

How to measure site speed

  • PageSpeed Insights: Google's free tool. The top shows data collected from real users, and the bottom shows a lab test with concrete recommendations.
  • Google Search Console: The Core Web Vitals report shows which groups of pages on your site are good, need improvement or are poor.
  • Browser developer tools: The Lighthouse and Network tabs, opened with F12 in Chrome, show in detail how long each file takes to load.

Don't fixate on a single measurement; lab results change a little with every run. Take several measurements before and after a change and compare them.

Optimize your images

On most sites, images make up the largest share of page size, and this is where the quickest gains come from:

  • Use modern formats. WebP and AVIF produce much smaller files than JPEG and PNG at the same quality.
  • Serve them at the right size. Don't upload a 4000-pixel photo for an image that will be shown 400 pixels wide. Use srcset to serve sizes that suit different screens.
  • Specify width and height. Adding width and height to the <img> tag reserves space while the image loads and lowers CLS.
  • Lazy-load what's off screen. Add loading="lazy" to images further down the page. Don't lazy-load the main image at the top of the page (usually the LCP element), though; giving it fetchpriority="high" improves LCP.

Use caching

Caching means not doing the same work again on every visit:

  • Page cache: On dynamic sites such as WordPress, every page is rebuilt with PHP and the database on every visit. A page cache stores the finished HTML and serves it directly; it is the step that lowers TTFB the most. On hosting that uses the LiteSpeed web server, the LiteSpeed Cache plugin does this at the server level.
  • Browser cache: Giving CSS, JavaScript, image and font files long-lived Cache-Control headers means visitors don't download these files again on the next page.
  • Object cache: A cache such as Redis keeps the results of frequently repeated database queries in memory. It makes a difference on high-traffic sites with many logged-in users.

Lighten JavaScript, CSS and fonts

  • Remove unnecessary JavaScript. Unused plugins, sliders and chat widgets make the page slow to respond to interaction and worsen INP.
  • Limit third-party scripts. Analytics, ad and social media scripts load from servers you don't control. Keep the ones you really use and load them with defer or async where possible.
  • Minify CSS and JavaScript. Minifying, which removes whitespace and comments, reduces file size.
  • Use fewer fonts. Each font weight is a separate file. Stick to two or three weights, use the WOFF2 format and use font-display: swap so text appears before the font loads.

Use a CDN

A CDN serves copies of your static files from servers close to your visitors. For sites that get visitors from different countries, it noticeably reduces latency and lightens the load on your main server. We explain how a CDN works and how to set one up with Cloudflare in What is a CDN?

Strengthen the server side

The foundation of every optimization is how quickly the server responds:

  • Use a current PHP version. Newer PHP versions are noticeably faster than older ones. Pick the most recent version your site supports in your control panel.
  • Fast storage and web server: NVMe disks handle database queries faster, and web servers such as LiteSpeed and Nginx handle concurrent requests faster.
  • HTTP/2 and HTTP/3: These let many files download in parallel over a single connection. Your site needs to run over HTTPS for this; take a look at What is an SSL certificate?
  • Keep the database clean. In WordPress, old post revisions, spam comments and expired transient data bloat the database.
  • Choose a location close to your visitors. A server far from your visitors adds latency to every request; we explain the effect of distance in What is ping?

A quick checklist for WordPress

  1. Choose a current PHP version.
  2. Install a page caching plugin.
  3. Use a plugin that converts images to WebP and resizes them.
  4. Delete the plugins and themes you don't use.
  5. Pick a lightweight theme; most page builders load extra CSS and JavaScript.
  6. Clean up the database regularly.

For installing WordPress and the first settings, take a look at our How to install WordPress guide.

A fast foundation with Nodesty

Nodesty web hosting plans run on AMD Ryzen 9 7900 servers with the LiteSpeed web server and NVMe storage; with free SSL you serve your site over HTTP/2, and you can choose your PHP version in the control panel. For applications that need more control, our AMD Ryzen 9 9950X VPS plans deliver low server response times with their high single-core speed.

Frequently Asked Questions

Does site speed affect Google rankings?

Yes. Google uses Core Web Vitals as one of its page experience signals. Speed alone won't earn a good ranking; content always comes first. But among similar content, fast and usable pages have an advantage, while slow pages lose visitors.

Why is my PageSpeed Insights score different every time?

Lab tests vary with network conditions, the server's load at that moment and third-party content such as ads. Instead of fixating on a single measurement, look at the average of several runs and especially at the real user data (Chrome User Experience Report) shown at the top of the page.

Why is my mobile score so much lower than desktop?

The PageSpeed Insights mobile test simulates a slow network and a mid-range phone. Large images, heavy JavaScript and many fonts cause much more noticeable slowness on mobile. The most effective ways to raise your mobile score are shrinking images and removing unnecessary JavaScript.

Does cheap hosting slow down my site?

The server's response time (TTFB) is the starting point of every page load. Overcrowded servers, slow disks and old PHP versions stretch this time and limit the effect of other optimizations. Hosting with NVMe storage, current PHP and a fast web server such as LiteSpeed gives you a solid foundation.

My site broke after installing a caching plugin. What should I do?

First clear the cache. If the problem continues, turn off the CSS and JavaScript combining and minifying options one at a time to find which one causes it. Page caching is usually safe; most problems come from aggressive JavaScript optimizations.

Should I use WebP or AVIF for images?

Both produce much smaller files than JPEG and PNG and are supported by all current browsers. AVIF is usually smaller but slower to encode. In practice, WebP is a safe and fast default; image optimization plugins can generate both automatically.

Nodesty

About the author

Nodesty Team · Infrastructure & Support

The Nodesty team runs our servers, network and DDoS protection day to day and answers customer support requests around the clock. These guides come from that work.

Related articles

Launch your server now.

Build, scale, and conquer without limits on Nodesty's premium infrastructure.

                                                                                                                                                                                                                            
                                                                                                                                                                                                                            
                                                                                                                                                                                                                            
                                                                                                                             ············································                                                   
                                                ··································································································..........···························                                     
                                       ················..........................................................................................................................··············                             
                                  ·············.................::::::::::::::::::::::::::::::::::::::::::::::....................:::::::::::::::::::::::::::::::::::::::................···········                        
                             ············................:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::............·········                     
                         ············.................:::::::::::::::::::::::::::::::::::::::::::::::::::------------::::::::::::::::::::::::::::::----------------:::::::::::::::::::::..........········                  
                    ············......................::::::::::::::::::::::::::::::::::::------------------------------------------------------------------------------------:::::::::::::.........········                
                ··········.............................................::::::::::::::::::-------------==========================================-----------------------------------:::::::::::........·······               
             ········..................:.....................................::::::::::--------=======+++++++++++++++++++++++++++++++++++++=========================------------------::::::::::.......·······              
           ······.........::::::::::::::::::::................................:::::::-----=====++++xxxxxx**************************xxxxxxxxx++++++++++++++===================------------::::::::.......·······             
          ·····.......:::::::::::::::::::::::::::.............................:::::----===+++xxx****%%%%&&&&&&#############&&&&&&&%%%%%*******xxxxxxxx++++++++++++++==============----------:::::::......······             
         ····......::::::::-------------:::::::::::..........................::::---===+++xx***%%%&&&####@@@@@@@@@@@@@@@@@@@@@@@@####&&&&&%%%%*******xxxxxxxxx+++++++++++++===========--------::::::......·····             
        ····.....:::::::--------------------:::::::::.......................::::---===++xxx**%%&&&###@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@###&&&&%%%%%********xxxxxxxxxxx++++++++++++========------::::::.....······            
        ····.....:::::--------------------------::::::::....................::::---===++xx***%%&&&####@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@###&&&&&%%%%%**********xxxxxxxxxxxxx+++++++++=======------:::::.....·····            
        ····....::::::-------=============---------:::::::::................:::::---===+++xx***%%%&&&#####@@@@@@@@@@@@@@@@@@@@@@@@@#####&&&&&%%%%%%*************xxxxxxxxxxxxxx+++++++++======-----:::::....·····            
         ····....:::::-------================---------:::::::::...............:::::----===++++xxx***%%%%&&&&&&#################&&&&&&%%%%%%%*******************xxxxxxxxxxxxxxxxx++++++++======----:::::....·····            
         ·····....:::::--------=================---------::::::::::..............:::::::-----====+++++xxxxxx**************************xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx++++++++=====-----::::....·····            
          ·····.....:::::--------=================----------:::::::::::.................:::::::::-------=============++++++++++++++++++++++++++++++++++++xxxxxxxxxxxxxxxxxxxxxxx++++++++======-----::::....·····            
            ·····.....:::::::----------===========-------------::::::::::::.........................::::::::::::::::::------------------=============+++++++++++++++++++++++++++++++++=======-----::::.....·····            
              ······......:::::::---------------------------------:::::::::::::........................................:::::::::::::::-----------============+++++++++++++++++++++========------:::::.....·····             
                 ······........:::::::::---------------------------:::::::::::::::::...........................................:::::::::::::------------=============================--------::::::.....······              
                    ·········.........:::::::::::::::-------------::::::::::::::::::::::::.......................................::::::::::::::::--------------------------------------::::::::......·······                
                          ··········............::::::::::::::::::::::::::::::::::::::::::::::::::................................::::::::::::::::::::::::::-------------:::::::::::::::.........········                   
                                  ············..................:::::::::::::::::::::::::::::::::::::::::::.........................:::::::::::::::::::::::::::::::::::::................···········                        
                                             ················.............................................................................................................·················                                 
                                                           ······················................................................................···························                                                
                                                                               ·········································································