Improve Speed with Google Lighthouse Audits

Are you tired of spending hours trying to speed up your WordPress site, only to see your page speed plummet after making a small change? If so, you’re not alone. Many website owners struggle with this issue, but there is a solution: configuring Google Lighthouse to perform speed audits on demand for your WordPress site.

Why Speed Testing is Important for Your WordPress Site

There are two main reasons why your website needs to be fast. Firstly, the attention span of the average web user is very short, with 47% of consumers expecting a web page to load in less than two seconds. If your page takes too long to load, users will quickly abandon it. This is especially important for e-commerce stores, where reducing load times is crucial.

Secondly, Google has been using site speed as a ranking signal since 2010. This means that the speed of your website is an important factor in how high up the Google SearchRank your page appears. For this reason, Google’s own PageSpeed Insights is a key tool used by SEO specialists and marketers to assess page speed.

Fortunately, there are several tools available to test the speed of your WordPress site. One of the most popular is Google Lighthouse.

Using Google Lighthouse with WordPress

Google Lighthouse is a tool that can be run against any page, whether it requires authentication or not, and whether it is running on WordPress or not. It will run a series of user-defined tests and generate a report on how the page performed. These reports can then be used to improve the overall quality of your web pages, including their speed.

While you can run Lighthouse directly from Chrome DevTools, there is also a version of the tool that is continuously updated. This is known as Lighthouse CI (Continuous Integration), and it can be configured to run automatically every time your site is updated or changed. This can be done using a Lighthouse budget, where you can define a number of bespoke speed tests for different parts of your site.

Setting up Lighthouse CI on Your WordPress Site

Setting up Lighthouse CI to run on your WordPress site is not complicated, but it is a little involved. Here is a basic outline of the process:

1. Set up a new GitHub repository to keep track of the changes to your WordPress site.

2. Download Lighthouse CI and configure it to look for changes.

3. Build a Lighthouse action that runs automatically every time a URL is changed on your WordPress site.

4. Create a separate Google Cloud Function that can update the Lighthouse CI action configuration with the recently changed URLs from the XML sitemaps, and then send the new configuration to the repository.

At this point, you will have an instance of Lighthouse CI running automatically on your WordPress site, alerting you when your planned changes will make it slower. From here, you can even add automatic actions to your GitHub repo to prevent changes of this type being published to your site.

The Best Alternative to Lighthouse CI

If you’re not comfortable with setting up Lighthouse CI, or if you’re looking for an easier solution, there are other options available. Many WordPress hosts, such as SiteGround or Kinsta, come with certain speed testing tools that claim to boost site speed by over 200%. These tools can also be used in conjunction with Lighthouse CI if you so choose.

Final Thoughts

Installing Lighthouse CI on your WordPress site is a great way to get better oversight of how it is performing. However, it won’t help you improve its performance. If you’re continually seeing pages exceed your Lighthouse performance budget, it’s time to take action. Read through our guides on how to optimize your WordPress pages, or consider researching CDN services that can speed up WordPress. Whatever approach you take, make sure you are auditing regularly to ensure your website’s success.

Stay in Touch


Related Articles