EDITS.WS

Tag: performance

  • CommandBar for WordPress

    Navigating the WordPress dashboard can be a chore. It can take several clicks just to edit a post. What if you could magically jump to where you want to be with a simple key command? It’s absolutely possible with a plugin called CommandBar.

    The post “CommandBar for WordPress” first appeared on WP Mayor.

  • Performance improvements in WordPress 6.1: enhanced database peformance and more

    WordPress 6.1 – the last major release of 2022 – is finally here! This release is a step in the right direction for full-site editing, bringing various customization options and improvements to the content creation and site creation experience. We’ve covered some notable changes in this update, which you can check out here. This post is dedicated to exploring the performance enhancements coming to our favorite open-source platform.

    WordPress 6.1 is the collective effort of a massive team of developers and contributors. Jean Baptiste Audras – the Triage team lead – shared some amazing statistics about the contributions to this release. An impressive 800 people from at least 60 countries and 180 identified companies contributed to WordPress 6.1.

    At Yoast, we’re proud of the work we’ve put into making this release possible. Out of all companies that contributed to 6.1, Yoast takes the number 2 spot with 740 contributions made by 16 contributors. Sergey Biryukov – a member of our dedicated team of WordPress contributors – tops the list with a whopping 584 contributions! Not to mention Bluehost – a fellow company in Newfold Digital – also contributed greatly to this release with 150 contributions.

    Image courtesy of jeanbaptisteaudras.com

    The WordPress Core Performance Team has done some incredible work to make the platform faster in the 6.1 release. This team, comprising members from Google, 10up, XWP, and Yoast, was formed in 2021 to monitor, enhance, and promote performance in WordPress core and its surrounding ecosystem. Without them, these improvements wouldn’t have been possible.

    Performance improvements are always welcomed by the community. We all know the importance of good website performance for SEO – a fast site is more favorable to rank high in the SERP. That’s due to Google and other search engines rewarding sites that deliver a fast and smooth user experience. Of course, you need good content to rank. But among many quality results, any small performance improvements may prove to be significant.

    Let’s dive into some of the notable performance enhancements in WordPress 6.1!

    Huge improvements to WP_Query with caching additions

    The addition of caching to WP_Query is one of the most significant performance improvements in WordPress 6.1. Basically, every time a visitor requests a web page, their browser has to make a request to the web server asking for information. The server needs to respond to this request and retrieve data from a database (or multiple ones) to send back. By implementing caching to WP_Query, the next time another visitor requests that same page, the page’s data would be retrieved from the website’s cache instead of retrieving data directly from the database.

    These changes aim to reduce the number of database queries and make sites faster, especially when using persistent object caching like Redis or Memcached. That’s because the database query will not run again until caches are invalidated. With fewer database queries, your pages will load faster, thus providing a better user experience for visitors.

    This is a much anticipated and welcomed improvement for many, especially developers. Jonny Harris – the contributor who worked on this improvement – shared his excitement in a recent Tweet.

    Improvements to the REST API

    Another significant performance boost comes with improvements to the REST API. In short, these updates decrease the number of database queries that run on each REST API request, allowing your pages to load faster.

    For instance, WordPress introduces an improvement of the post controller in the REST API. When returning a post in a REST API response, the post controller would request linked data such as author, featured image, and text. Since these linked items are not primed (ready for use) in caches, it might mean that for each post in the REST API response, there would be data queries from separate databases: one for the author, one for the featured image, and another for the text.

    Instead, in WordPress 6.1, all the caches are primed in a single database query. That means that the post controller in the REST API can grab data from that single database query instead of requesting data from separate databases, resulting in fewer queries.

    Improvements to the Cache API

    The Cache API gets various improvements in this release. Most notably, several private cache priming functions are available for public use in this release. WordPress encourages plugin and theme authors to use these functions to improve the performance of their code by reducing the number of database queries, which improves the website’s load speed.

    Media improvements

    WordPress 6.1 will automatically add decoding="async" to image attributes. In simple terms, this function tells your visitor’s browser that it’s okay to load images a bit later in favor of other information and data. This results in the page loading the content much faster and also reduces page render time. This is a huge performance booster for any web page containing a lot of images. It’s also good to know that you can remove this function.

    Site health improvements

    WordPress 6.1 introduces two new Site Health checks for Persistent Object Cache and Page Cache.

    • Persistent Object Cache – This new check determines whether the site uses a persistent object cache or not and recommends it if it makes sense for the site. It also links to a support resource created for the check. A few filters have been included for hosting providers to provide more specific steps regarding their environment.
    • Full Page Cache – This new check determines whether the site is using a full page cache solution and if the response time is acceptable. It also adds a couple of filters for hosting companies to customize the response threshold and add their own cache headers to be detected.

    Improved compatibility with PHP 8x

    WordPress 6.1 receives important compatibility improvements with PHP 8.0 and 8.1. All of this is possible thanks to the incredible work of many developers, especially Juliette Reinders Folmer. A few of us Yoasters also contributed to this effort, namely Sergey Biryukov, Carolina, and Ari Stathopoulos!

    The 6.1 release has continued the code modernization efforts on updating WordPress core and unit test suite for PHP 8.0 and 8.1, as well as preparing for PHP 8.2. Version 8.2 of PHP is expected to be released on November 24, 2022. We can expect some significant changes coming in PHP 8.2, which could impact many themes and plugins.

    The big step forward in this release is that WordPress core unit tests now pass on PHP 8.1 and 8.2. While full compatibility with PHP 8.1 and 8.2 is still a work in progress, this should prevent new PHP issues from being introduced in WordPress core. All remaining known issues are deprecation notices.

    It’s good to note that a deprecation notice is not an error, but rather an indicator of where additional work is needed for compatibility before PHP 9 (i.e. when the notices become fatal errors). With a deprecation notice, the PHP code will continue to work and nothing is broken.

    Changes to the loading routine

    As of WordPress 6.1, the send_headers hook has been moved to slightly later in the WordPress loading routine. This is a ticket that our Sergey Biryukov worked on!

    When you request a page, the web server needs to send back some headers that contain technical information about the page like response status. This lacks flexibility because some functions wouldn’t work when headers are being sent. By moving send_headers to after WordPress parses the query, those functions now work properly. This change may affect plugin developers, making it easier for them to manage header.

    Performance enhancements in the editor

    Some optimizations were made to the block editor to avoid repetitive calls to filesystem and processing of block.json files. These changes should improve loading performance and benefit all WordPress sites. Ari Stathopoulos – another member of our WordPress core contributor team – was responsible for making this happen!

    Want to try out more performance improvements?

    The WordPress Core Performance team has created the Performance Lab plugin to give users early access to new performance modules they’re working on. Install it and you’ll be able to try out their latest developments yourself, see how they impact your site’s performance and share any feedback you have. If you’d like to be even more involved, you can also help out as a contributor! And if you’re interested in finding out more about the performance improvements in 6.1, don’t forget to check out this Performance Field Guide thread. It contains loads of useful information for developers!

    The post Performance improvements in WordPress 6.1: enhanced database peformance and more appeared first on Yoast.

  • How To Fix High CPU Usage In WordPress

    High CPU usage from your WordPress site is never a good sign. At best, you’ll see loading times drop to a snail’s pace, and at worst, your site can become inaccessible to visitors. 

    Scary stuff, isn’t it? Luckily, there are plenty of things you can do to sort out your CPU issues once and for all!

    The post “How To Fix High CPU Usage In WordPress” first appeared on WP Mayor.

  • An Introduction to the WordPress REST API

    The WordPress REST API is a way for other pieces of code to access and manipulate information about your WordPress site.

    The post “An Introduction to the WordPress REST API” first appeared on WP Mayor.

  • How to Improve First Contentful Paint (FCP) in WordPress

    A First Contentful Paint (FCP) score gives you an indication of how much time it takes your site to render. A poor score means your visitors are likely having to wait longer than they should. 

    Fortunately, there are steps you can take to improve this. By optimizing your website’s resources, you can ensure that your content loads quickly and keeps users engaged. 

    In this post, we’ll explain what FCP is, why it’s important, and how to test your website for this metric. Then, we’ll show you how to improve a poor FCP score in WordPress.

    What is First Contentful Paint (FCP)?

    First Contentful Paint (FCP) is a measurement of the amount of time it takes a browser to load the first text or image on the page. Put simply, this is the delay between the start of the loading process to when the page begins to display content.

    FCP is one of the main metrics in Google’s Core Web Vitals. These metrics evaluate the user experience of a website, and include:

    You should work towards improving all of these metrics in order to give users the best possible experience. And while it’s not a primary core web vital, First Contentful Paint is a supplemental metric that can help you identify and improve upon loading issues.

    Google wants to send searchers to sites that deliver an excellent experience, and so great scores are not only a goal for a quality user experience, but may result in an improvement in search rankings. 

    How FCP impacts user experience

    When a visitor first clicks on a website, they expect it to load quickly. If your website is too slow, they might leave the page and find the iinformation they’re looking for from a competitor. 

    First Contentful Paint marks the time it takes for a visitor to see the first element on a page. 

    This is important because, even if the page takes a while to load everything or become fully interactive, as long as a visitor can see some sort of progress, they may be more likely to give a few extra seconds to finish. If, instead, all they see is a blank screen, they’ll probably just leave completely. 

    Potential causes of a poor FCP score

    According to Google, the ideal FCP score should be under 1.8 seconds. If you have a poor score, this could be the result of a few factors:

    • Slow server response time: If your website has a high Time to First Byte (TTFB) score, this can impact First Contentful Paint. 
    • Render-blocking JavaScript and CSS: An inefficient script queue can halt the rendering process until heavy scripts are processed.
    • Script-dependent elements above the fold: Since JavaScript loads from top to bottom, it’s important to avoid JavaScript-heavy elements above the fold.
    • Lazy loading images above the fold: Although lazy loading images can improve page speed, this process uses JavaScript, which can increase FCP. 
    • Inefficient font loading: Fonts can have bulky files that delay the text from rendering. 
    • An excessive Document Object Model (DOM) size: Having too many nodes in your DOM can cause inefficient loading.

    As you can see, there are several things that can affect your website’s First Contentful Paint. Most performance analysis tools will help you identify a specific cause. This can make it easier to target the source of the issue and implement the right solution. 

    How to measure your website’s First Contentful Paint

    Before you start implementing measures that will affect your FCP score, it’s important to evaluate your site’s current performance. Let’s look at a few different tools that you can use. 

    PageSpeed Insights

    First Contentful Paint can be measured in both the lab and the field. With a field tool, you can track how your page performs for real users. But lab tools just simulate results.

    PageSpeed Insights is a tool that can evaluate your website using both lab and field results. You can simply enter your site’s URL and instantly analyze its Core Web Vitals metrics.

    PageSpeed Insights homepage

    At the top of the page, you’ll see your Core Web Vitals Assessment. This will indicate whether you passed or failed tests like LCP, FID, CLS, and more.

    results from Google PageSpeed, showing scores for LCP, FID, and CLS

    You’ll find your First Contentful Paint score under Other Notable Metrics. If it’s 1.8 seconds or less, you’ll achieve a ‘Good’ rating. Any score over 1.8 seconds will require some improvements.

    other notable metrics in Google PageSpeed

    These results will automatically be set to Mobile. You can click on Desktop to view your FCP score for those devices.

    desktop view of core web vitals

    If you see a ‘Poor’ or ‘Needs Improvement’ rating for the FCP section, you’ll need to implement some optimization methods. 

    Lighthouse

    Lighthouse is a lab tool that can audit any web page for accessibility, Core Web Vitals, and more. This software will compare your FCP time to other websites. 

    To use Lighthouse, right-click on the page you want to analyze in the Google Chrome browser and select Inspect.

    Running Google lighthouse on a site

    In the Chrome DevTools window, find the double arrow icon. Then, select Lighthouse from the resulting dropdown menu.

    Running a test with Google Lighthouses

    Next, you can select the elements that you want to include in your Lighthouse report. When you’re finished, click on Analyze page load.

    analyze page load button in Lighthouse

    After Lighthouse processes your website, you’ll see your overall performance score. Below this, you’ll find your First Contentful Paint.

    first contentful paint score in Lighthouse

    If you see a green circle next to this section, you have a good FCP score. If you get a yellow square or red triangle, your content takes too long to render.

    GTmetrix

    Another free tool you can use to measure FCP is GTmetrix. Using Lighthouse data and audits, GTmetrix provides a detailed analysis of your website’s performance.

    First, paste your URL into the search bar and click on Test your site.

    GTMetrix homepage with URL bar

    Then, you can view your First Contentful Paint score in the Speed Visualization graph.

    speed visualilzation graph in GTMetrix

    If your FCP is too slow, it will be under Top Issues. In this FCP audit, you can see how specific resources are impacting your score.

    Top Issues listed in GTMetrix

    By identifying the cause of the problem, you can implement the right solution. Plus, GTmetrix will provide suggestions to help you improve your FCP score. 

    How to reduce First Contentful Paint time in WordPress 

    Don’t worry if your site has a poor FCP score — there are several things you can do to boost your performance. Let’s look at some effective ways to improve this metric.

    1. Install a core web vitals optimization plugin

    There are many different WordPress plugins that you could use to improve your First Contentful Paint score. Although you can install different tools to minify site files or get rid of render-blocking resources, it’s best to find an all-in-one Core Web Vitals plugin.

    Jetpack Boost is a free tool that can optimize your site’s performance in many ways. Developed by Automattic, the company behind WordPress.com, this plugin can help you improve your Core Web Vitals scores with just a few clicks.

    First, install and activate Jetpack Boost. Then, you’ll receive an automatic evaluation of your page speed on desktop and mobile devices.

    It will also give you a few performance optimization options. By enabling these settings, you can easily optimize CSS, defer non-essential JavaScript, and implement lazy image loading.

    settings in Jetpack Boost

    You can then run another speed test to see if your performance score has improved. As you can see, using Jetpack can be one of the fastest and easiest ways to improve First Contentful Paint in WordPress.

    2. Reduce server response time

    Server response time, or Time to First Byte (TTFB), is the time it takes the server to send the first byte of information back to a browser. This measures the delay between the start of a request and the beginning of the response.

    First Contentful Paint depends on TTFB. Here’s an example of how FCP and TTFB work together in the loading process:

    FCP = TTFB + Render Time

    This means that reducing server response time can be an effective way to improve First Contentful Paint in WordPress. One of the easiest ways to do this is by finding a quality web hosting service.

    Often, it’s best to choose a host that’s configured specifically for WordPress. A WordPress hosting service can optimize your dynamic content and improve your server response time. This may, in turn, boost your FCP score.

    It also helps to have servers close to your audience. Therefore, when you’re evaluating a web host, you’ll want to check its server locations. If your audience is spread out geographically, you may also want to invest in a WordPress CDN so visitors can access your site from a server closer to them. 

    Once you choose your new hosting provider, you can easily migrate your WordPress site. Then, you can enjoy faster loading speeds, reduced server response time, and improved FCP. 

    3. Eliminate render-blocking resources

    When someone tries to visit your website, all the elements on the page have to render. During this process, your site’s code downloads from top to bottom. Before your content appears, the browser needs to read this entire queue of scripts.

    Unfortunately, there may be render-blocking resources that prevent the page from loading. In this case, an unnecessary HTML, CSS, or JavaScript file has to be rendered, which stops the browser from loading important content.

    These files are usually large and don’t contain vital information. When render-blocking resources are processed at the top of the queue, your images, text, or other essential visual elements can take longer to appear. As you can imagine, this can negatively affect your FCP, as well as LCP and Total Blocking Time (TBT).

    Using PageSpeed Insights, you can easily check to see if this is a problem for your site. In the Opportunities section, look for an Eliminate render-blocking resources alert.

    list of opportunities for improvement in Google PageSpeed

    To fix this problem, you can use the Jetpack Boost plugin to optimize CSS, defer non-essential JavaScript, and defer off-screen images. This will improve your file structure for faster loading.

    If you want to edit your scripts manually, you can install the Async JavaScript plugin. 

    Async JavaScript plugin in the WordPress repository

    This tool enables you to add async or defer attributes to specific files, but the process can be a little complicated. With Jetpack Boost, you can easily optimize your site files without working with code.

    4. Optimize your CSS structure

    When you write code, you may include spaces so that people can easily understand it. The problem is that these additional characters can take up more disk space. Plus, browsers don’t need white spaces to process coding.

    CSS optimization involves taking out extra spaces and characters from your CSS files. By eliminating unnecessary information, you can decrease a page’s size. This can make it easier for a browser to read it, and can therefore improve your FCP score.

    Jetpack Boost lets you do this in one simple step. By enabling the Optimize CSS Loading setting, the plugin will minify your files to only load critical CSS.

    Optimize CSS Loading option in Jetpack Boost

    With Jetpack Boost, you can also generate the Critical Path CSS for the page with the click of a button. This is the minimum amount of CSS coding needed to display above-the-fold content.

    Creating Critical Path CSS manually can be a daunting task, but you can use a tool like Pegasaas to automate the process. By simply entering your site’s URL, you can access this code.

    Pegasus homepage with a blue background

    Then, you can add this CSS inside the <head> section of your HTML. When done correctly, this will immediately render the above-the-fold content without asynchronous stylesheets.

    5. Avoid JavaScript-dependent elements above the fold

    Even after you optimize your JavaScript, it can still take more time to load than HTML. Since FCP measures the amount of time it takes the first element to render on a page, it’s important to make sure that these aren’t JavaScript-heavy.

    When structuring your website, you’ll want to avoid making your layout dependent on JavaScript above the fold. To improve First Contentful Paint, many people choose to delay or eliminate JavaScript. If your first elements depend on heavy scripts, your page won’t load very quickly.

    Here are some JavaScript elements that should be moved below the fold:

    • Heavy animations
    • Sliders
    • Social media widgets
    • Google Ads

    Since JavaScript code is executed from top to bottom, it can be beneficial to move these elements further down the page. If they are below the fold, visitors can see your content much faster.

    6. Avoid lazy loading images above the fold

    One of the best ways to speed up your website is to implement lazy loading for images. Essentially, this involves processing images once they appear on the screen. If someone is looking at the top of the page, any images below it won’t have to load yet.

    Although lazy loading images can have many benefits, they may actually harm First Contentful Paint. Lazy loading implements a script that defers images from loading. Since it uses JavaScript, it can delay your FCP score.

    When using Jetpack Boost, you can specify which images to exclude from lazy loading. For images above the fold, you can add the CSS class skip-lazy.

    You can also apply the jetpack_lazy_images_blocked_classes filter. This will inform Jetpack to avoid applying lazy loading to any image with a certain class.

    Here’s what that code looks like in practice:

    function mysite_customize_lazy_images( $blocked_classes ) {
        $blocked_classes[] = 'my-header-image-classname';
        return $blocked_classes;
    }
    add_filter( 'jetpack_lazy_images_blocked_classes', 'mysite_customize_lazy_images' );

    It can also be a good idea to disable lazy loading for your site logo. By doing this, your logo will be rendered faster, encouraging users to stay on the page. 

    7. Optimize and compress images

    Usually, images aren’t the first elements to render on a page. For this reason, you might not have to optimize images to improve FCP. Still, you’ll want to consider performing this step to reduce your loading time and put less strain on your server resources.

    First, you can switch your file format to SVG or WebP. Your site is likely using JPG, PNG, or GIF image files. By using a format with better compression, you can possibly decrease First Contentful Paint.

    You can also use an image compression plugin. With a tool like TinyPNG, you can automatically optimize JPEG, PNG, and WebP images as you upload them to WordPress.

    If certain images don’t need high-quality resolution, you can inline them. This can be useful for above-the-fold images like logos, icons, and banner images. When you inline these elements, the browser won’t use as many requests to download them.

    To inline an image, you have to convert it into a Base64 or SVG format. The Base64 Image tool can automatically change JPG, PNG, GIF, WebP, SVG, and BMP files into a Base64 file.

    Base64 tool homepage

    Then, you can add your Base64 images to your website. Here’s the HTML code you can use:

    <img src="data:image/jpeg;base64,/uj/…[content]..." width="100" height="50" alt="this is a base64 image">

    For CSS, here’s how you can insert a Base64 file:

    .custom-class {
        background: url('data:image/jpeg;base64,/9j/…[content]...');
    }

    If you’re using an SVG file, you can inline the image in HTML:

    <body>
      <!-- Insert SVG code here, and the image will show up! -->
        <svg xmlns="http://www.w3.org/2000/svg">
            <circle cx='50' cy='25' r='20'/>
        </svg>
    </body>

    Keep in mind that inlining images can increase their size, as well as the overall page size. Plus, these images can’t be delivered by your Content Delivery Network (CDN). 

    8. Leverage server-level caching

    Once someone clicks on your website, their browser requests data from your server. Then, the server processes the requests and sends back the relevant resources.

    With server-level caching, your server temporarily stores these files for reuse. After the same user sends the request a second time, your server will send the saved copy of the web page. 

    By using a cache, your server won’t have to generate the content from scratch every time. This can effectively reduce the strain on your server and enable users to view content sooner.

    To start using a server-level cache, you can install a caching plugin like WP Super Cache. Then, your server will deliver generated static HTML files instead of processing PHP scripts.

    Plus, you can easily set up your cache in the WP Super Cache settings. All you have to do is select Caching On.

    WP Super Cache settings

    This can be one of the simplest ways to decrease your server processing time. With caching, you can ensure a fast and pleasant experience for repeat visitors. 

    9. Use a Content Delivery Network (CDN)

    Another way to improve your FCP score is to use a Content Delivery Network (CDN). A CDN is a network of servers that can deliver online content across large distances. When someone visits your site, the CDN delivers your content from the server that’s closest to their location.

    By implementing a CDN, you can decrease the distance between your server and visitors. As a result, these visitors can experience faster loading times.

    Fortunately, Jetpack comes with a free built-in WordPress CDN. After activation, you can go to Jetpack → Settings → Performance & speed and enable the site accelerator.

    settings for Jetpack's CDN tool

    This can effectively speed up the delivery of your images and static files. No matter their location, visitors will be able to access your content without a significant delay. 

    10. Reduce your DOM size

    The Document Object Model (DOM) is an interface that represents the structure and content of a web document. If you have overly-complicated pages on your website, it can increase your DOM size. This can harm your performance, including your First Contentful Paint.

    Lighthouse will let you know if you have an excessive DOM size. In general, you’ll only be warned if the body element has more than 800 nodes. If there are more than 1,400 nodes, you’ll receive an error message.

    excessive DOM size error message

    If you’re editing your DOM yourself, you’ll want to make sure that you only create necessary nodes and delete non-essential ones. If you have a WordPress site, these tasks will be completed by themes, plugins, core software, and page builders.

    Here are some alternative ways to reduce your DOM size in WordPress:

    • Separate long pages into smaller ones
    • Reduce the number of posts in your archive and home page
    • Avoids using unnecessary <div> tags
    • Use fewer CSS selectors

    It can also be beneficial to choose an optimized WordPress theme. Using a fast and lightweight option like Twenty Twenty-Two can help you decrease your DOM size.

    11. Ensure text remains visible during webfont load

    Often, fonts have large files that take a long time to load. In some cases, a browser will delay rendering the text until the font is fully loaded. This is known as a Flash of Invisible Text (FOIT).

    To prevent this from happening, you can temporarily show a system font. This involves including a font-display: swap in the @font-face style.

    Here’s what that can look like: 

    @font-face {
     font-family: 'Pacifico';
     font-style: normal;
     font-weight: 400;
     src: local('Pacifico Regular'), local('Pacifico-Regular'), url(https://fonts.gstatic.com/s/pacifico/v12/FwZY7-Qmy14u9lezJ-6H6MmBp0u-.woff2) format('woff2');
     font-display: swap;
    }

    Alternatively, you may want to import a font from Google Fonts. In this case, you can apply the &display=swap parameter to your Google Fonts link:

    <link href="https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap" rel="stylesheet">

    Instead of showing a flash of invisible text, your website will reveal a Flash of Unstyled Text (FOUT). This can enable your website to display content immediately, improving First Contentful Paint.

    Frequently asked questions (FAQs) about First Contentful Paint

    Let’s look at some common questions about First Contentful Paint.

    How can I measure my WordPress website’s FCP score?

    You can use a few different tools to measure your First Contentful Paint. With PageSpeed Insights, Lighthouse, or GTmetrix, you’ll be able to identify your FCP score and troubleshoot specific issues. 

    What is a good FCP score?

    A good FCP score should be 1.8 seconds or less. A metric between 1.8 and 3 seconds will likely need improvement. Anything higher than 3 seconds will require immediate attention. 

    How can I easily optimize my FCP score?

    One of the simplest ways to improve your FCP score is to use the Jetpack Boost plugin. This free tool can optimize your Core Web Vitals all in one place.

    First, install and activate Jetpack Boost. Then, click on Jetpack to start upgrading your website’s performance.

    Here, you can optimize CSS loading, defer non-essential JavaScript, and use lazy image loading. By simply enabling each feature, you can automatically improve your First Contentful Paint in WordPress. 

    Display your online content right away

    By improving your First Contentful Paint, you can make sure that your content loads more quickly for visitors. Without this measure, you could experience a much higher bounce rate.

    To measure your FCP, you can analyze your website with PageSpeed Insights. If you receive a poor score, you can use Jetpack Boost to optimize your scripts and image files. Additionally, you can use the plugin to enable lazy loading and use a CDN.

    Once you implement these measures, your visitors can start experiencing faster loading times. This means a lower bounce rate and more engaged audience! 

  • Optimize Your WordPress Site with Database Cleaner

    How bloated is your WordPress database? Sometimes it seems that no matter what you do to optimize your site, it’s still a little sluggish. You should be using a database cleaner.

    The post “Optimize Your WordPress Site with Database Cleaner” first appeared on WP Mayor.

  • How to Improve Google Core Web Vitals on WordPress

    If you have a WordPress site, you understand the value of a top-notch user experience. It impacts your conversion rate, subscriber count, ad views, search engine rankings, and more.

    Poor Core Web Vitals can negatively impact that user experience.

    But what exactly are Core Web Vitals? Why are they so important? And how can you improve WordPress Core Web Vitals? Let’s take a look.

    What are Core Web Vitals?

    Core Web Vitals are a set of metrics used by Google to determine how websites perform. Unlike other performance measurements, they use real world data to examine how specific aspects of the loading process impact your user experience. There are currently three Core Web Vitals metrics:

    1. Largest Contentful Paint (LCP), which relates to loading performance
    2. First Input Delay (FID), which relates to interactivity
    3. Cumulative Layout Shift (CLS), which relates to visual stability

    Why are Core Web Vitals important for a WordPress site?

    Why do they matter? Because they measure how visitors interact with your website, they’re tied to your user experience. The happier your visitors are, the more likely they are to subscribe to your newsletter, purchase your products, or inquire about your services. And if they have to wait and wait for your website to load, they might leave and visit a competitor.

    But Google also uses Core Web Vitals as a ranking factor. This means that they consider them when determining where your website shows up on search engines for your target keywords. After all, Google wants to provide the best quality results for searchers, so it’s no surprise that they value these user experience metrics.

    Which metrics make up Core Web Vitals?

    Without further explanation, the list of Core Web Vitals might seem confusing or overwhelming. So let’s take a closer look at each one.

    Largest Contentful Paint (LCP)

    LCP relates to the perceived load speed of your website, reporting the time it takes for the largest element to fully load on the page. In many cases, this is a large hero image or video at the top of the page, though this can vary from site to site. In some cases, it might even just be a block of text. This can also be different on desktop and mobile devices. 

    Largest contentful paint only applies to elements that render and are visible to a visitor. So scripts loading in the background wouldn’t impact this metric. 

    Ideally, you’d like your LCP to be as low as possible. Google considers less than 2.5 seconds to be a “good” score, less than or equal to 4.0 seconds to “need improvement,” and more than 4.0 seconds to be a “low” score. 

    Learn more about largest contentful paint on WordPress.

    First Input Delay (FID)

    FID relates to how interactive your website is, measuring the time between when a visitor takes an action on a page to when their browser actually reacts to that action. Let’s break this down a little more.

    When someone clicks a button on your site that opens a pop-up, their browser has to process the request. If it gets stuck trying to process a large JavaScript file, then it will take longer for the pop-up to open. Not good. 

    The faster your site reacts to an action, the lower your FID score is, and the happier your visitors (and search engines!) are.

    Those actions, by the way, are things like taps, clicks, and key presses. Scrolling and zooming are considered separately from first input delay, as they’re continuous actions.

    The interesting consideration here, however, is that some people will visit your website and never take a specific action. They might read through your content, then go elsewhere without clicking or opening anything. Because of this, some visitors will have absolutely no FID value, which can make measuring first input delay perhaps a bit inaccurate.

    Regardless, it’s still a valuable metric to understand and work on improving if necessary. Google considers a good FID score to be less than 100 ms. A score that needs improvement is between 100 ms and 300 ms. Anything over 300 ms is poor.

    Learn more about first input delay in WordPress.

    Cumulative Layout Shift (CLS)

    CLS measures the degree to which site visitors experience unexpected shifts in the layout of a page. What does that mean exactly?

    Let’s say that a follower is reading a recipe on your food blog. They’re about to click on a link to an ingredient when, suddenly, the entire page shifts, and they end up accidentally clicking on an ad instead. They’re taken off-site to the advertiser’s landing page and, frustrated, decide not to come back to your blog at all.

    This is a perfect example of why CLS is so important. If your page suddenly moves, it can cause visitors to have trouble reading your content or click on something by mistake. That’s a surefire way to lose fans, readers, and customers. 

    Google defines a layout shift as “any time an element that is visible within the viewport changes its start position…between two frames.” But what exactly causes this to happen? A poor CLS score is typically caused by elements on the page loading at different times — an image without a defined size, an ad without set dimensions, custom fonts, or other third-party embeds.

    The CLS score is measured as the difference between the original loading site and the final place that an element ends up. A good score is anything less than 0.1. Scores between 0.1 and 0.25 need improvement, while anything above 0.25 is considered poor.

    Learn more about cumulative layout shift in WordPress.

    How to measure Core Web Vitals on WordPress

    Now that you know what WordPress Core Web Vitals are and why they matter, let’s find out how you can test your site. There are several tools you can use to do this.

    1. PageSpeed Insights 

    PageSpeed Insights is a tool directly from Google that provides a wealth of information about your website’s performance, including your Core Web Vitals. All you have to do is enter your URL, and in a few seconds, you’ll see a speed report for both desktop and mobile. 

    PageSpeed Insights report

    At the very top, you’ll see your Core Web Vitals, with scores for LCP, FID, and CLS. They’re presented very visually, so you’ll know right away if your site is good to go or if it needs improvement. You’ll also get related speed metrics that aren’t part of Core Web Vitals, like Time to First Byte (TTFB) and Time to Interactive. You can click Expand View to see more information about each one.

    If you keep scrolling, you’ll see a list of opportunities for improvement, which you can filter based on the Core Web Vital that each suggestion applies to. 

    opportunities to improve core web vitals in Google PageSpeed

    Click the arrow to the right of each one to see more details. Finally, at the bottom, there is a list of Passed Audits, which are all the things your site is doing well. 

    2. Google Search Console

    Google Search Console is another Google-owned tool that’s chock-full of information about SEO. There’s a lot you can do here, from submitting your sitemap to viewing and fixing indexing issues. And, of course, since Core Web Vitals are related to SEO, there’s an entire section dedicated to them.

    If you don’t already have a Google Search Console account, you’ll need to register your website. First, find the Select Property dropdown and click Add Property. You’ll then be presented with two options: 

    1. Domain: Covers all the URLs, including both HTTPS and HTTP, and all subdomains. This is the most exhaustive option but also the most complicated to set up as it involves editing your DNS records.
    2. URL prefix: Covers just the URLs that fall under the domain name that you enter. So, if you enter example.com, it would include example.com/contact-us, but not blog.example.com. This route also allows for a variety of verification methods.
    verification options for Google Search Console

    For the purpose of this example, we’re moving forward with the URL prefix method. Enter your URL in the box provided and click Continue.

    Now, you’ll see several different verification options:

    • HTML file: Download an HTML file and upload it to your site via FTP or cPanel.
    • HTML tag: Copy the meta tag provided, then add it to the <head> section of your site’s homepage.
    • Google Analytics: Use your existing Google Analytics account to verify your site.
    • Google Tag Manager: Use your existing Google Tag Manager account to verify your site.
    • Domain name provider: Edit your DNS records to associate your site with Google.

    Choose whichever method is easiest for you — Google provides additional instructions on each one — and proceed forward. Once your site is verified, you can click on Core Web Vitals in the left-hand menu of Google Search Console.

    There, you’ll see charts for both the mobile and desktop version of your site that give you an overview of how it’s performing. 

    chart of URLs inside of Google Search Console

    Click Open Report for more information. There, you can view how each of your URLs stacks up when it comes to Core Web Vitals. You can even come back here once you’ve made improvements to resubmit the page to Google and validate your fixes.

    CLS issue warning in Google Search Console

    3. Google Lighthouse

    Google Lighthouse is a tool designed for developers and site owners for improving the quality of their websites. It runs tests based on accessibility, performance, SEO, and more. There are several different ways you can run Google Lighthouse: 

    • With Chrome DevTools
    • Using a Chrome extension
    • With a Node module
    • With a web User Interface (UI)

    For the purposes of this post, we’ll walk you through how to use Chrome DevTools to find your Core Web Vitals in Google Lighthouse.

    In the Google Chrome browser, navigate to your website. Right click anywhere on the page and select Inspect from the options that appear. This will open a variety of tools that you can explore, but you’ll want to click on the Lighthouse tab. 

    Google Lighthouse report

    Now, select the Mode, Device, and Categories you want to test. You can select as many categories as you’d like if you want additional information, but to find Core Web Vitals, make sure you check the box next to Performance. Click Analyze page load.

    Once the audit is complete, it will show you your Core Web Vitals, along with other data and metrics about your site performance.

    core web vitals in Google Lighthouse

    How to improve Core Web Vitals on WordPress

    At this point, you should have a good idea of how your website performs. Next, let’s take a look at how you can improve your WordPress Core Web Vitals.

    1. Install a plugin designed for Core Web Vitals

    The absolute easiest step you can take is to use a Core Web Vitals WordPress plugin like Jetpack Boost. It was created by Automattic, the people behind WordPress.com, so you can trust that it works seamlessly with your site, themes, and plugins. The best part? It’s completely free to use!

    This tool enables you to perform some rather complicated optimization tasks by just toggling a few buttons. Here’s how to get started:

    In your WordPress dashboard, go to Plugins → Add New. Search for “Jetpack Boost” and click Install Now → Activate. Then, navigate to Jetpack → Boost. Click the green Get Started button.

    Jetpack will then calculate a performance score for your site as it stands currently.

    Jetpack Boost calculating speed score

    You’ll then be able to activate five key tools:

    1. Optimize CSS Loading: Turning this on generates critical CSS for your site. What exactly does this do? Before a browser can show your page to visitors, it has to download and analyze all the CSS for that page. If your CSS files are large, this can take a significant amount of time, slowing down your site. Generating critical CSS, however, extracts the code that’s strictly necessary for the content that’s visible above the fold to render. It prioritizes that CSS, so the rest can be loaded in the background. This speeds up load time tremendously and helps improve your LCP score.
    2. Defer Non-Essential JavaScript. This causes JavaScript code that isn’t immediately essential to render after the rest of the page loads. Not only does this help the visual content of your page load faster, it can also improve your FID and LCP scores.
    3. Lazy Image Loading. This loads images as a visitor scrolls down the page rather than taking the time to load them all upfront. This, in turn, speeds up your site and improves your LCP score.
    4. Minify CSS. This feature removes unnecessary code from your CSS — such as spaces, indents, and comments — so that it loads faster.
    5. Image CDN. Enabling this instantly takes weight off of your host by offloading heavy image files and delivering them to visitors from WordPress servers located around the world. Plus, images will automatically be resized and served to visitors based on their individual device and platform. It’s a quick, free way to improve the performance of your WordPress site.

    Once you’ve enabled any or all of these settings, you can click Refresh to recalculate your performance and see the improvements made.

    How simple is that? No editing code. No figuring out complicated settings. Just click a few buttons and you’re good to go!   

    2. Choose a high-performance hosting provider

    The hosting provider you choose plays a significant role in your website’s performance. Selecting a reputable host that offers fast server response times, SSD storage, and server-level caching can make a considerable difference in your site’s loading speed. Some factors to consider while choosing a hosting provider are:

    • Fast server response times. Look for a provider that guarantees low server response times, ideally below 200ms.
    • SSD storage. Solid-state drives (SSDs) offer faster data access and higher reliability than traditional hard drives.
    • Server-level caching. Providers that offer server-level caching can reduce the load on your server and increase the speed of your site.

    Additionally, choosing a host with data centers close to your target audience can reduce latency and improve user experience. Managed WordPress hosting services can provide better performance and optimization compared to shared hosting solutions, as they’re tailored specifically to WordPress websites.

    3. Use a lightweight and optimized theme

    A well-optimized theme forms the basis of a fast-loading website. To ensure the best performance, select a minimal, performance-oriented theme that avoids excessive features, bloated code, or too many HTTP requests. Here are some actionable tips to help you choose the right theme:

    • Check the theme’s demo site. Analyze the performance of the theme’s demo site using tools like Google PageSpeed Insights or GTMetrix. This can give you an idea of how the theme will perform on your site.
    • Look for performance-focused features. Opt for themes that highlight performance-related features, such as optimized code, minimal use of JavaScript, and support for responsive design.
    • Test the theme before committing. Install the theme on a test site and evaluate its performance with your desired plugins and content to ensure it meets your needs.

    4. Optimize images

    Images can account for a significant portion of your site’s loading time. To optimize your images, follow these best practices:

    • Use proper image formats. WebP, JPEG XR, or AVIF offer better compression and quality compared to older formats like JPEG and PNG. Use tools like Squoosh to convert your images to these formats.
    • Implement lazy loading. Lazy loading defers the loading of off-screen images until they are needed, reducing the initial page load time. You can use plugins like Jetpack Boost to enable lazy loading on your WordPress site.
    • Compress and resize images. Use tools like TinyPNG or Imagify to compress your images without losing quality. Additionally, resize your images to the appropriate dimensions for your site’s layout. If you have Jetpack Boost, this is already taken care of for you automatically.
    • Use a CDN to serve images. A CDN like Jetpack CDN can deliver images from a server closer to your users, reducing latency and improving loading speed. This is another tool included with Jetpack Boost — one of many reasons why it’s an ideal performance plugin for WordPress sites. 

    5. Optimize CSS and JavaScript

    CSS and JavaScript files can have a significant impact on your site’s loading speed. To optimize these files, follow these best practices:

    • Minify and compress CSS and JavaScript files. Use tools like Jetpack Boost to optimize CSS and JavaScript delivery, thus improving loading speed.
    • Combine and inline critical CSS and JavaScript. Combining and Inlining critical CSS and JavaScript can help minimize the number of HTTP requests, speeding up your site’s load time. This is one of the many features of Jetpack Boost.
    • Use async or defer attributes for non-critical JavaScript files. Adding async or defer attributes to your non-critical JavaScript files can help reduce render-blocking. The async attribute allows the script to be downloaded asynchronously, while the defer attribute delays script execution until the page has finished parsing. You can use a plugin like Jetpack Boost to defer non-essential JavaScript.
    • Remove render-blocking resources. Identify render-blocking CSS and JavaScript files using a tool like Google PageSpeed Insights, and remove or replace them to reduce the time it takes for your site’s content to become visible. This may involve removing unnecessary plugins or scripts or finding more performance-friendly alternatives.

    6. Implement server-side optimizations

    Server-side optimizations can greatly impact your site’s performance. Follow these best practices to optimize your server configuration:

    • Enable GZIP or Brotli compression. Enabling GZIP or Brotli compression on your server can reduce file sizes and speed up transfers. You can enable compression via your server’s configuration files.
    • Configure HTTP/2 or HTTP/3 for faster connections. HTTP/2 and HTTP/3 offer improved performance over the older HTTP/1.1 protocol, such as multiplexing, header compression, and server push. Check with your hosting provider to ensure they support these protocols and enable them if possible.
    • Set up server-level caching and cache-control headers. Configuring server-level caching and cache-control headers can help improve performance by reducing the load on your server. This can be achieved by modifying your server’s configuration files or using a plugin like WP Super Cache.
    • Use a reverse-proxy setup (e.g., NGINX or Varnish). A reverse-proxy setup can help improve the performance and scalability of your site by caching content and distributing the load among multiple servers. Consult your hosting provider or server administrator to determine the best reverse-proxy solution for your needs.

    7. Use a content delivery network (CDN)

    A CDN can significantly improve your site’s loading speed by serving static assets, such as images, CSS, and JavaScript files, from a global network of servers. This reduces latency by delivering these assets from a server that is geographically closer to the visitors. To implement a CDN, follow these steps:

    • Select a WordPress-friendly CDN provider. Choose a CDN provider that offers easy integration with WordPress. If you’ve already opted to use Jetpack Boost for its other performance-enhancing features, you’ll have instant access to Jetpack’s powerful image CDN.
    • Configure your CDN to serve static assets. Once you’ve selected a CDN provider, configure it to serve your site’s static assets, like images, CSS, and JavaScript files. This can typically be done through the provider’s dashboard or by using a plugin. If you’re using Jetpack Boost, this is taken care of automatically. 
    • Enable CDN-level caching and optimizations. Some CDN providers offer additional performance optimizations, such as image optimization, minification, and compression. Be sure to enable these features to get the most out of your CDN.

    8. Optimize your WordPress database

    Optimizing your WordPress database can help improve performance by removing unnecessary data and reducing database size. Follow these best practices to optimize your database:

    • Clean up unnecessary data. Remove unwanted data — such as revisions, spam comments, and transients — from your database. You can do this manually using a tool like phpMyAdmin or by using a plugin like WP-Optimize.
    • Automate database maintenance. Use a plugin like WP-Optimize to automate database cleanup and optimization tasks, ensuring your database stays lean and efficient.
    • Regularly back up your database. Always back up your database before performing any optimizations to avoid data loss. You can use a plugin like VaultPress Backup to back up your database in real time.

    9. Use a performance-focused caching plugin

    Caching plugins can dramatically improve your site’s performance by storing static versions of your pages and serving them to visitors instead of generating them on each request. To implement caching on your WordPress site, follow these steps:

    • Install a caching plugin. Install a performance-focused caching plugin like WP Super Cache, which is designed to work seamlessly with WordPress and improve your site’s speed.
    • Configure page caching, browser caching, and object caching. This can be done through the plugin’s settings page, with detailed instructions available in the plugin’s documentation.
    • Enable CSS and JavaScript minification, concatenation, and deferment. Some caching plugins, like WP Super Cache, also offer additional optimization features such as minification, concatenation, and deferment of CSS and JavaScript files. Enable these features to further improve your site’s performance.

    10. Optimize web fonts

    Web fonts can have a significant impact on your site’s performance and user experience. To optimize your web fonts, follow these best practices:

    • Limit the number of font variants. Each font variant adds weight to your site, so only use the necessary font weights and styles.
    • Use the “font-display” property. This CSS property controls how fonts are rendered while they are being loaded, helping to prevent layout shifts and improve user experience. Set the “font-display” property to “swap” or “fallback” to ensure that text remains visible during font loading.
    • Serve fonts locally or from a reliable CDN. Hosting fonts locally or using a reliable CDN can help improve performance by reducing the number of external requests and ensuring faster font delivery.

    11. Optimize third-party scripts and plugins

    Third-party scripts and plugins can negatively impact your site’s performance. To optimize them, follow these best practices:

    • Audit your plugins. Regularly review your installed plugins and remove any that are unnecessary or slowing down your site. This can be done by deactivating plugins one by one and testing your site’s performance using a tool like GTMetrix or Google PageSpeed Insights.
    • Defer or async load non-critical third-party scripts. Use the defer or async attributes to load non-critical third-party scripts — such as social media widgets or analytics scripts — after the main content has loaded. Deferring non-essential JavaScript can be done in just a few clicks with a plugin like Jetpack Boost.
    • Replace slow plugins with lightweight alternatives. If a particular plugin is causing performance issues, consider replacing it with a more lightweight alternative that offers similar functionality.

    12. Address CLS issues

    Cumulative Layout Shift (CLS) measures the visual stability of your site, with lower scores indicating a more stable layout. To address CLS issues, follow these best practices:

    • Set explicit dimensions for images, videos, and iframes. Assign width and height attributes to images, videos, and iframes to reserve space in the layout, preventing content from shifting as these elements load.
    • Avoid inserting content above existing content. Dynamically inserting content above existing content can cause layout shifts. Instead, use techniques like overlays or sidebars to display additional content.
    • Use CSS containment properties and the “transform” property. Apply CSS containment properties, such as “contain”, and use the “transform” property to isolate layout shifts and prevent them from affecting other elements on the page.

    13. Implement DNS prefetching and preconnect

    DNS prefetching and preconnect help establish early connections to important third-party domains, reducing the time it takes for resources to be fetched. To implement these techniques, follow these steps:

    • Use “dns-prefetch” and “preconnect” link tags. Add “dns-prefetch” and “preconnect” link tags to your site’s header to establish early connections to critical external resources like web fonts, CDNs, and analytics services.
    • Prioritize connections to critical external resources. Ensure you are prefetching and preconnecting to the most important external resources to optimize performance. You can use a tool like Lighthouse to identify critical resources, then do this manually or using a WordPress plugin.

    14. Optimize Time to First Byte (TTFB)

    TTFB is a measurement of the time it takes for a visitor’s browser to receive the first byte of data from your server. To optimize TTFB, follow these best practices:

    • Implement server-side caching and opcode caching. Enable server-side caching and opcode caching (e.g., using OPcache or APCu) to reduce the amount of time it takes for your server to process and deliver content.
    • Use PHP-FPM or HHVM for improved PHP processing. PHP-FPM and HHVM are alternative PHP processing engines that can offer improved performance over the standard PHP interpreter. Check with your hosting provider to see if they support these engines and enable them if possible.
    • Optimize your database by using an object cache like Redis or Memcached. Implementing an object cache like Redis or Memcached can help improve database performance and reduce TTFB. Consult your hosting provider or server administrator to determine the best object caching solution for your needs.

    15. Use Critical Request Chains analysis

    Analyzing your site’s critical request chains can help identify opportunities to optimize the loading order of resources and minimize render-blocking resources. To perform a critical request chains analysis, follow these steps:

    • Analyze your site using tools like Lighthouse or WebPageTest. These tools can help you identify critical request chains and highlight potential performance issues.
    • Optimize the loading order of critical resources. Based on the analysis, rearrange the loading order of your critical resources to minimize render-blocking resources and improve performance. This may involve adjusting the placement of CSS and JavaScript files, using the “preload” attribute, or implementing HTTP/2 server push.

    16. Implement server push and preload

    Server push and preload are techniques that can help improve the loading performance of your critical resources. To implement them, follow these steps:

    • Use HTTP/2 server push. HTTP/2 server push allows you to send critical assets to the browser before they’re requested, improving the loading performance of your site. To implement server push, consult your hosting provider or server administrator, as the configuration varies depending on your server setup.
    • Implement “preload” link tags. Add “preload” link tags for high-priority resources like web fonts, critical CSS, and important images. This can be done manually by adding the tags to your site’s header or by using a plugin.

    17. Improve server response times

    Optimizing server response times can significantly improve your site’s performance and user experience. To optimize server response times, follow these best practices:

    • Monitor server response times using tools like New Relic or Datadog. These monitoring tools can help you track server response times and identify any bottlenecks or performance issues.
    • Identify and address bottlenecks. Investigate the bottlenecks identified by your monitoring tools and address them accordingly. This may involve upgrading your server hardware, optimizing your database, or adjusting your server configuration.

    18. Optimize WordPress cron jobs

    WordPress cron jobs are scheduled tasks that run in the background, performing tasks like updating plugins, publishing scheduled posts, and sending email notifications. Optimizing your cron jobs can help improve your site’s performance. To optimize WordPress cron jobs, follow these best practices:

    • Disable the default WordPress cron system. The default WordPress cron system relies on visitors to trigger scheduled tasks, which can be inefficient and slow down your site. Disable the default system by adding the following line to your wp-config.php file: define(‘DISABLE_WP_CRON’, true);
    • Use a real server-side cron job instead. Replace the default WordPress cron system with a real server-side cron job, which runs independently of your site’s visitors. This can be set up through your hosting provider’s control panel or by consulting your server administrator.
    • Schedule resource-intensive tasks during periods of low traffic. To minimize the impact of resource-intensive tasks on your site’s performance, schedule them to run during periods of low traffic, such as overnight or on weekends.

    19. Consider advanced caching techniques

    Advanced caching techniques can further improve your site’s performance by optimizing the way content is cached and delivered. To implement advanced caching techniques, follow these best practices:

    • Implement Edge Side Includes (ESI) for fragment caching. ESI is a technique that allows you to cache individual fragments of a web page separately, enabling more efficient and fine-grained caching. To implement ESI, consult your hosting provider or server administrator, as the configuration varies depending on your server setup.
    • Use HTTP caching headers like “stale-while-revalidate” and “stale-if-error”. These caching headers can improve cache efficiency by allowing the browser to serve stale content while fetching updated content in the background or in case of an error. To use these headers, update your server’s configuration or consult your hosting provider or server administrator for assistance.

    Frequently asked questions about WordPress Core Web Vitals

    Still looking for information about Core Web Vitals in WordPress? Let’s answer some frequently asked questions.

    Do Core Web Vitals impact SEO on WordPress?

    Yes, Core Web Vitals can impact your WordPress SEO. In fact, Google made Core Web Vitals a ranking factor, meaning that they’re considered when the search engine determines the order in which websites rank for certain keywords.

    This is because Core Web Vitals are a great indication of user experience. If a site takes a long time to load valuable content or moves around a lot when someone’s using it, this can really negatively impact their experience. And since Google wants to provide the highest-quality results to searchers, this is important to them.

    Do Core Web Vitals impact user experience on WordPress?

    While Core Web Vitals don’t exactly impact user experience, they are a measurement of the quality of your user experience. Let’s say you’re visiting your favorite blog or online store, and it takes a long time for the hero image to load. Perhaps you click a button and nothing seems to happen for several seconds. Or maybe you’re scrolling and, all of a sudden, the page jumps, and you completely lose track of where you were. 

    If any of those things were to happen to you, it would be frustrating, right? You might even leave the site entirely and go somewhere else. At the very least, your opinion of the brand would be impacted.

    And that’s exactly why Core Web Vitals are connected to your site’s user experience. Poor Core Web Vitals are a sign of difficulty interacting and engaging with your content, which, of course, you never want, no matter what type of site you run.

    How can I easily optimize my Core Web Vitals right now?

    The easiest, fastest way to quickly optimize your Core Web Vitals in WordPress is to use a plugin like Jetpack Boost. It’s the best WordPress speed plugin, designed specifically to address Core Web Vitals. By just toggling a few settings, you can optimize CSS loading, defer non-essential JavaScript, turn on lazy image loading, and more. 

    And it couldn’t be simpler to set up! All you have to do is install and activate the plugin, run an initial speed test, then turn on toggles for each setting you want to enable. That’s it!

    No matter your experience level or the type of site you own, you can use Jetpack Boost to quickly and easily optimize your Core Web Vitals. Ready to take the first step towards a better user experience and improved search engine rankings? Get started with Jetpack Boost.

  • WP Super Cache Joins the Jetpack Family

    Over the last 15 years, WP Super Cache has become one of the most popular WordPress plugins, helping improve performance for more than two million sites for free. It was created in 2007 by Automattic developer Donncha Ó Caoimh.

    “WP Super Cache is a great plugin for handling caching needs, but there is an opportunity to make it more useful for a wider variety of sites. I have been working on the plugin for 15 years, and it’s time to hand it over to a new team. Jetpack will be able to put much more effort and time into the plugin than I ever could, and I’m excited to see what becomes of it,” said Donncha.

    Jetpack will move development to its Performance team, which works on related features like Jetpack Boost and the CDN. “We’re excited to start working on WP Super Cache,” Jetpack Performance Lead Mark George says. “Our goal is to create an experience where anyone can make their site extremely fast without being an expert. We want to help make sure that WP Super Cache remains a reliable and easy option for that.”

    More of the same

    We’re happy to say that WP Super Cache will continue to be a great way to speed up your site for free. You can enjoy its core features without a new plugin or a connection to Jetpack.

    What will be changing

    While we research new features to help make WordPress sites cache faster, we will begin updating the WP Super Cache UI to bring it in line with modern standards, so it is easier to use. In addition, we’ll be working behind the scenes to ensure it’s compatible with our other performance features like Jetpack Boost.

    Speed up your site

    For those that aren’t familiar, WP Super Cache is a static caching plugin for WordPress. It generates HTML files served directly by Apache without processing comparatively heavy PHP scripts. This simple step should speed up your WordPress site significantly.

    Haven’t tried WP Super Cache yet? Speed up your site today.

  • How to Add & Use a CDN in WordPress (Full Setup Guide)

    There are a lot of ways to speed up a website, but one of the most effective is using a Content Delivery Network (CDN). A CDN stores copies of your site, or select content, on a network of servers, then sends that content to your visitors’ computers from the server that can do it the fastest. This is usually one nearest to them geographically. 

    Using a content delivery network distributes your server’s workload — meaning your site loads faster and more reliably while reducing the resources used by your hosting plan. 

    Because there are so many options, the question isn’t really whether you should use a CDN for your WordPress site, but which one to use and how to integrate it with WordPress. 

    Some CDNs are free. Others come with hefty fees. Some require advanced technical knowledge to set up and others are built for WordPress and can be easily integrated with a plugin.

    The point is that not all CDNs are the same. Below, you’ll learn how to choose the right CDN for WordPress and how to install it. Then, we’ll discuss the benefits of using a CDN and answer some frequently asked questions.

    What’s the best CDN for WordPress?

    There are a lot of CDN services that you can use with any website. Although, one downside of most content delivery networks is that they’re premium services. This is because of the infrastructure required behind the scenes.

    To put it simply, when you sign up for a CDN, you get access to a global network of real-world data centers. These data centers cache copies of your site and its files. 

    So, when a visitor goes to access your site, the CDN then ‘intercepts’ that connection and serves the website from the data center that’s closest to the user. This way, the website is delivered more quickly and efficiently.

    Essentially, CDNs are optimized to serve content as quickly as possible and to be able to handle massive amounts of traffic. With a CDN, your website still works just as intended, but in most cases, it loads much faster than it would using your hosting provider’s servers alone.

    Popular content delivery networks (CDNs)

    There are a lot of choices for CDNs. Cloudflare is one popular option that comes with additional services you may or may not want. While it’s well-known, it’s going to be more complicated to set up when compared to other solutions that are completely dedicated to WordPress sites. That said, if you have an advanced site and an IT team available to help, it could be a great option. There are free plans available with limited features, but business plans start at $200 per month and are designed for companies that rely heavily on their website. 

    Cloudfront is a CDN service from Amazon. It’s part of the Amazon Web Services suite of tools and is another option that could be ideal for sites with a large volume of traffic (hundreds of thousands or millions of hits each month) or a large database of content or products. You’ll need an AWS account and an AWS Identity and Access Management user to get started. Cloudfront does have a plugin for WordPress, but you might want to view the getting started documentation to see if you, or your IT manager, is up for what might be a lengthy setup process. Cloudfront was not designed solely for WordPress sites.

    KeyCDN is another CDN for WordPress that you may have heard of. It has powerful, fast servers and a focus on speeding up images — one of the heaviest parts of a website. It also includes a plugin that makes integrating with WordPress relatively simple. However, there are still quite a few settings that require configuration, which can be confusing for non-developers. There’s also no free plan available, and pricing is based on storage space used. This means that the more you grow, the more you’ll have to pay.  

    The best CDN for most WordPress sites

    Unless you’re a larger company, many popular CDNs can be prohibitively expensive or complicated to manage. But most WordPress sites can greatly benefit from an outstanding free option that’s built specifically for WordPress — Jetpack.

    Jetpack offers a free CDN that you can use for your website’s images and static files. Those are features built into the base version of the plugin. You don’t even need a premium Jetpack license to access CDN functionality.

    Jetpack Boost homepage

    Additionally, you can install the Jetpack Boost plugin, which will help you optimize your load times even further. With Jetpack Boost, you can improve your Core Web Vitals by having the plugin optimize your CSS, defer non-critical scripts, and enable lazy loading for your site.

    If you’re not sure what CDN to use, you can’t beat Jetpack when it comes to easy integration. 

    How to install a CDN in WordPress

    Typically, installing a CDN involves editing your Domain Name Records (DNS) so they point to the service instead of your web hosting provider. However, that process can vary depending on which content delivery network you’re using.

    With Jetpack, you don’t need to edit any domain records to use the CDN functionality. For WordPress CDN setup with Jetpack, all you have to do is install the plugin and activate it. After that, you’ll need to connect the plugin to a WordPress.com account to start taking advantage of its features.

    Although Jetpack works with self-hosted WordPress sites, it’s developed by the Automattic team (the same people behind WordPress.com). Creating a free WordPress.com account takes only minutes and you don’t need to use it beyond entering your credentials to activate Jetpack.

    How to configure your WordPress CDN

    We’re going to use Jetpack CDN as an example. Before you read through it, however, you may want to check out other CDN getting started documentation like this one from Cloudfront. Then, compare Jetpack’s configuration process below to fully understand the difference in ease of use. 

    How to configure Jetpack CDN

    Once the plugin is active on your website, navigate to Jetpack → Settings and open the Performance tab. Look for the section that says Performance & speed and turn on the Enable site accelerator option:

    turning on Jetpack CDN

    At the bottom of this section, you can also choose to enable lazy loading for images. If you do, visitors won’t have to load all images from your website’s pages at once. Instead, images will only start to load as users scroll down the respective pages.

    If you’re using Jetpack Boost, there will be an additional Jetpack → Boost page in the dashboard, where you get access to more performance-related settings. From this page, you can monitor your PageSpeed Insights performance scores for the desktop and mobile versions of your website.

    Jetpack Boost performance score

    If you already enabled lazy loading via Jetpack, you can skip that setting here. Then, you can turn on the Optimize CSS Loading and Defer Non-Essential JavaScript settings and you’re good to go.

    These settings aren’t part of Jetpack’s CDN functionality, but they’re essential if you want to improve your website’s overall performance. All in all, the Jetpack CDN features and Jetpack Boost go hand-in-hand in helping you reduce site load times.

    What are the key benefits of Jetpack CDN?

    Some CDNs offer massive rosters of servers spread out across the world, which is perfect for large, global enterprises. Others have a wide range of extra features built in. For most sites, these far exceed what they’ll ever need or use. 

    If you’re running a growing website and simply want to speed up your site without breaking the bank, Jetpack CDN is the ideal option.

    With Jetpack, you get to leverage the world-renowned WordPress.com infrastructure to improve your site’s loading times, all for free. Here are some other benefits:

    • It’s easy to set up. Other CDNs typically involve a complex integration process. In most cases, you need to configure your DNS settings to point to other nameservers to use a CDN. This can be confusing, especially for WordPress beginners. But Jetpack enables you to enhance your website’s performance without a complicated configuration process.
    • It can reduce your hosting fees. Because many of your large files are offloaded to Jetpack CDNs servers, your storage capacity and bandwidth used with your hosting provider are reduced. 
    • It includes unlimited resources. Many other CDNs charge more based on the size of your site or the number of visits you get in a certain time period. The more you grow, the more you pay! But Jetpack is free no matter how large your site becomes.
    • It’s built for WordPress. This means that it integrates seamlessly with the themes and plugins you’re already using and you don’t have to spend your valuable time troubleshooting compatibility issues. Plus, it’s always up-to-date with the latest version of WordPress. 
    • It includes automatic image compression. Images are typically one of the heaviest types of files on your WordPress site. Jetpack CDN automatically compresses images as you upload them to reduce their weight, and even optimizes them for mobile devices.

    Frequently asked questions (FAQs)

    If you still have any questions about CDNs and how they work, this section will answer them. Let’s start by digging into how to use a CDN in WordPress.

    What is a CDN in WordPress?

    Content delivery networks (CDNs) are services that enable you to cache copies of your site on third-party servers. Typically, CDNs have data centers around the world, which they use to serve the cached copies of your site when a visitor tries to access it. 

    If you decide to use a CDN, you’ll need to sign up for it. You’ll also have to integrate it with your site manually if you’re looking for ways to improve its performance.

    One key advantage of using a CDN with WordPress is that the CMS is so popular that most services offer easy integration with it. That means you usually get access to plugins or in-depth instructions on how to configure a CDN to work with your WordPress website.

    Do I need to use a CDN?

    Using a CDN isn’t strictly necessary for any website, but it’s recommended in most cases. That’s because ensuring that your website loads as fast as possible will improve the user experience and can help reduce its overall bounce rate.

    In most cases, integrating a CDN with WordPress will drastically reduce loading times almost immediately. If you combine the use of a CDN with other performance improvement tweaks, you’ll be able to offer the best possible user experience.

    If you don’t have the budget for a paid CDN, you can use a service like Jetpack. With Jetpack, you get access to most of the features that paid CDN services offer, all for free. If you want access to more advanced features you can always choose to upgrade to a premium Jetpack plan.

    What are the benefits of using a CDN for WordPress?

    The main benefit of using a CDN is to reduce your website’s load times. CDNs achieve this by serving cached copies of your site from the closest data center to its visitors. Their servers are optimized for performance. What’s more, they can typically handle a lot more concurrent traffic than regular hosting plans.

    Besides performance improvements, CDNs also offer a range of additional benefits. Some of them include:

    • Increased security: With a CDN, you get an added layer of security between attackers and your website. Some CDNs also offer web firewall functionality, which enables you to block connections from malicious sources. 
    • Protection against DDoS attacks: Most CDNs offer protection against distributed denial of service (DDoS) attacks. A DDoS attack is when someone directs massive amounts of concurrent traffic to your website to overwhelm it, making it impossible to access.
    • Diminishing your server’s workload: Since a CDN handles most visitor requests, your server doesn’t have to work as much. Often, that means you can opt for a less expensive hosting plan without sacrificing quality.

    If you’re using a free CDN like Jetpack, there’s basically no downside. Premium CDNs can be expensive, so it becomes a question of how much the increase in performance and the other benefits outweigh the costs. With a free (and powerful) CDN, it’s all upside. 

    Is there a free CDN built specifically for WordPress?

    Jetpack is the only WordPress-specific CDN on the market. Some of Jetpack’s features are only for users with premium licenses, like real-time WordPress backups and Customer Relationship Management (CRM) tools. Jetpack CDN, on the other hand, is available for all users.

    To get started using Jetpack and its built-in CDN, you only need to install the plugin and set up a free WordPress.com account. You can also install Jetpack Boost to improve performance even further.

    Will a CDN improve my WordPress site’s performance?

    In the vast majority of cases, using a CDN will result in an immediate performance boost. That’s because most CDN servers are far better optimized than regular ones. CDNs also offer data centers around the world, which cut down on latency issues when connecting to websites hosted in distant regions.

    If you’re using a performance-oriented WordPress hosting provider and you’ve configured your website properly, it might already load quickly. However, using a CDN can further reduce load times, which is always a positive.

    What else can I do to improve my site’s performance?

    There are a lot of ways to improve a website’s performance. When you set up a new WordPress website, it should load almost instantly. If it doesn’t, it’s likely that your web host is the problem.

    Unfortunately, not all web hosts are optimized for performance, even if you’re not using a shared hosting plan. If you have a brand new website and it’s taking more than two seconds to load, you might want to consider switching to a different hosting provider.

    On the other hand, if you’re happy with your web host and your site’s basic performance, there are still a lot of ways to reduce load times even further. Among those methods, you have options like:

    • Compressing images before or during upload. Images can take up a lot of server space and they can slow down loading times drastically. Instead of avoiding images, we recommend compressing them to reduce overall file sizes.
    • Enabling browser caching. With browser caching, visitors can store files from your site locally. That way, they don’t need to reload your website fully every time they visit it.
    • Turn on lazy loading for images. This feature makes it so that users don’t load images until they scroll down to see them. Lazy loading helps reduce the initial loading times for a page.
    • Minifying CSS and JavaScript. Most modern websites use a varied collection of CSS and JavaScript. Minifying these files reduces how long they take to load.

    On top of those optimizations, you’d also be wise to consider Core Web Vitals. These are user experience metrics that Google takes into account when ranking websites in search results. Core Web Vitals are directly related to website performance.

    If you use Jetpack Boost, the plugin can help you measure and improve your Core Web Vitals. 

    Use a content delivery network (CDN) to improve your WordPress website’s performance

    Making sure that your website is as fast as possible is key to providing a positive user experience. If you don’t, slow load times can cause you to lose visitors. Using a CDN is perhaps the best way to improve your site’s performance.

    There are a lot of options for CDNs that you can use with WordPress, but Jetpack CDN is a great, free tool that’s easy to configure. For most sites, Jetpack is the ideal tool to instantly improve site performance. 

    Check out Jetpack’s complete lineup of WordPress security, performance, and growth tools.