> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mainwp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lighthouse

> MainWP Lighthouse WordPress Extension is used for measuring the quality of your websites. It uses the Google PageSpeed Insights API to audit the performance, accessibility, and search engine optimization of your WordPress sites.

## What You'll Learn

* Installing and configuring the Lighthouse add-on
* Running performance audits on child sites
* Getting your Google PageSpeed Insights API key
* Understanding Lighthouse scores and reports

***

<div id="addon-data" style={{display: 'none'}} data-title="Lighthouse" data-purchase-url="https://mainwp.com/extension/lighthouse/" data-pricing-tier="pro" data-bundle="MainWP Pro" data-addon-type="integration" data-version="5.0" data-developer="MainWP" data-changelog-url="https://mainwp.com/changelog/mainwp-lighthouse-extension/" data-owned-by="Jestart LLC" data-privacy-url="https://mainwp.com/mainwp-plugin-privacy-policy/" />

<Info>
  **Extension Add-on** - This add-on provides standalone functionality within MainWP Dashboard. No third-party plugins required.
</Info>

<iframe className="w-full aspect-video rounded-xl" src="https://www.youtube.com/embed/GNYKJsoJso8" title="MainWP Lighthouse add-on - Video Tutorial" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />

## Install and Set MainWP Lighthouse Add-on

<Steps>
  <Step title="Go to your MainWP Dashboard" />

  <Step title="Go to the MainWP > Add-ons page" />

  <Step title="Click the Install Add-ons button" />

  <Step title="Locate the Lighthouse add-on and select it" />

  <Step title="Click the Install button" />

  <Step title="Once the installation process is complete, click the Activate Add-ons button" />
</Steps>

<img src="https://mintcdn.com/mainwp/2rlXQ4CNzTqDCqtT/images/add-ons/445c4bb68bdc.png?fit=max&auto=format&n=2rlXQ4CNzTqDCqtT&q=85&s=b2be260b38ea8f53e128e4616fa5705d" alt="Screenshot of Lighthouse add-on installation confirmation page" width="934" height="902" data-path="images/add-ons/445c4bb68bdc.png" />

* After successful installation, proceed to the Lighthouse settings

* Insert your **Google PageSpeed Insights API key**. If you don't have it, [see here how to get it](#get-the-google-pagespeed-insights-api-key).\\
  <img src="https://mintcdn.com/mainwp/fYo8wl5GET5OrNvZ/images/add-ons/876c22954fd1.png?fit=max&auto=format&n=fYo8wl5GET5OrNvZ&q=85&s=f36e8934033a54065f646cd76cbe10d3" alt="Screenshot of Lighthouse settings page with Google PageSpeed Insights API key field" width="1024" height="362" data-path="images/add-ons/876c22954fd1.png" />

* **Save Settings**, and you are ready to audit your sites.

## Audit Child Sites

<img src="https://mintcdn.com/mainwp/2rlXQ4CNzTqDCqtT/images/add-ons/46448916b42b.png?fit=max&auto=format&n=2rlXQ4CNzTqDCqtT&q=85&s=a8fa671fda0bf75b72bbcff2f6e267e1" alt="Screenshot of Lighthouse Dashboard page with Audit All Sites button" width="1024" height="333" data-path="images/add-ons/46448916b42b.png" />

<Steps>
  <Step title="Go to the MainWP > Add-ons > Lighthouse > Dashboard page." />

  <Step title="Locate the Audit All Sites button" />

  <Step title="Click it, and wait until the add-on completes the process." />
</Steps>

Alternatively,  you can use the **Bulk Actions** menu to audit only certain sites, or if needed use the Audit Site action from the site **Action Menu** to audit just one site.

## Schedule Automated Audits

<Steps>
  <Step title="Go to the MainWP > Add-ons > Lighthouse > Settings page." />

  <Step title="Locate the Automatically audit sites option and Enable it.">
    Locate the **Automatically audit sites** option and Enable it.<img src="https://mintcdn.com/mainwp/prJFyo89l1sl-7Fz/images/add-ons/lighthouse-seo-score.jpg?fit=max&auto=format&n=prJFyo89l1sl-7Fz&q=85&s=f44645118887184e465e98b2a6ec4454" alt="Screenshot showing Automatically audit sites toggle option" width="1048" height="206" data-path="images/add-ons/lighthouse-seo-score.jpg" />
  </Step>

  <Step title="Locate the Automated audit frequency option and set how often you want to check your sites.">
    Locate the **Automated audit frequency** option and set how often you want to check your sites.<img src="https://mintcdn.com/mainwp/prJFyo89l1sl-7Fz/images/add-ons/lighthouse-performance-score.jpg?fit=max&auto=format&n=prJFyo89l1sl-7Fz&q=85&s=2c02b95329ce2e73729526bc2e391761" alt="Screenshot showing Automated audit frequency dropdown options" width="1048" height="206" data-path="images/add-ons/lighthouse-performance-score.jpg" />
  </Step>

  <Step title="Save Settings." />
</Steps>

Get Lighthouse Report for a Site

<Steps>
  <Step title="Go to the Lighthouse > Dashboard page" />

  <Step title="Locate the site and click the Lighthouse Report action from the Actions Menu">
    Locate the site you want to check in the list and click use the **Lighthouse Report** action from the Actions Menu\\

    <img src="https://mintcdn.com/mainwp/PMb515K3nlj7x2jI/images/add-ons/65dc0ec03c90.png?fit=max&auto=format&n=PMb515K3nlj7x2jI&q=85&s=bb4a8266510fda8add1252d7dbf4b23a" alt="Screenshot showing Lighthouse Report action in site Actions Menu" width="1006" height="698" data-path="images/add-ons/65dc0ec03c90.png" />
  </Step>

  <Step title="Once redirected to the report page, you can review all details" />
</Steps>

## Widgets and Manage Sites table information

You can enable Performance Score columns (Desktop and Mobile) for the Manage Sites table from the Page Settings menu.

<img src="https://mintcdn.com/mainwp/9Fi7dKBCIriTb92d/images/add-ons/268cb5b38c9f.png?fit=max&auto=format&n=9Fi7dKBCIriTb92d&q=85&s=bdb1a942e91120c88e0cf91823d078bd" alt="Screenshot of Page Settings menu with Performance Score columns option" width="1024" height="384" data-path="images/add-ons/268cb5b38c9f.png" />

Widgets are available on the main Overview page and on the Child Site's Overview page. 

They can also be enabled in the Page Settings on the relevant page.

The widget on the main Overview page provides scores for the best and worst performing sites:

<img src="https://mintcdn.com/mainwp/prJFyo89l1sl-7Fz/images/add-ons/lighthouse-widget-scores.gif?s=3229f846da4d402d3da4610ecc712474" alt="Animated screenshot of Lighthouse widget showing best and worst performing sites" width="800" height="741" data-path="images/add-ons/lighthouse-widget-scores.gif" />

And the widget on the Child Site's Overview page provides scores for Desktop and Mobile and how that score has changed since the preceding audit.

<img src="https://mintcdn.com/mainwp/prJFyo89l1sl-7Fz/images/add-ons/lighthouse-dashboard.png?fit=max&auto=format&n=prJFyo89l1sl-7Fz&q=85&s=baf908288f7605b12b0c522800e1353b" alt="Screenshot of Lighthouse widget on child site page showing Desktop and Mobile scores with change indicators" width="1610" height="1184" data-path="images/add-ons/lighthouse-dashboard.png" />

## Lighthouse Settings

<img src="https://mintcdn.com/mainwp/prJFyo89l1sl-7Fz/images/add-ons/lighthouse-widget.png?fit=max&auto=format&n=prJFyo89l1sl-7Fz&q=85&s=d0fee4a915b821b4eaac66f44dbf00c6" alt="Screenshot of Lighthouse settings page showing all configuration options" width="1024" height="550" data-path="images/add-ons/lighthouse-widget.png" />

* **Google PageSpeed Insights API key** - In order to run audits, you need to enter your Google PageSpeed API key, if you don't have it, [see here how to get it](#get-the-google-pagespeed-insights-api-key).
* **Language** - Select language for Lighthouse reports.
* **Strategy** - Select if you want to get reports for Desktop, Mobile, or Both versions of sites.
* **Notifications threshold** - Set the threshold for notifications. If the score goes under the set value, the add-on will notify you.
* **Automatically audit sites** - If you want the add-on to automatically run audits, enable this feature.
* **Automated audit frequency** - If automated audits are enabled, here you can set how often you want them to run.
* **Maximum execution time** - Change the Max execution time if needed. If the Lighthouse reports are not being completed, increasing this value may help.
* **Maximum script run time** - Change the Max script run time if needed. If your scans do not finish completely and changing the Maximum Execution Time does not help, increase this value until you find the maximum allowed runtime.
* **Throttling delay time** - Change the Throttling delay time. Increasing this value may slow down Lighthouse reporting, but may help provide more accurate reports on poorly performing web servers.

## Audit Sites via WP CLI

Scan one or multiple sites:

wp mainwp-lighthouse audit 125,126

or all

wp mainwp-lighthouse audit --all

## Lighthouse REST API

All MainWP REST API calls, including full documentation, and examples, are now publicly available on [Postman](https://www.postman.com/mainwp/workspace/mainwp/overview).

Please refer to our [REST API documentation](/api-reference/rest-api/overview) for more details on enabling REST API and managing API keys.

## Get the Google PageSpeed Insights API Key

<Steps>
  <Step title="Log into your Google account." />

  <Step title="Navigate to https://developers.google.com/speed/docs/insights/v5/get-started and click Get a Key button">
    Navigate to [https://developers.google.com/speed/docs/insights/v5/get-started](https://developers.google.com/speed/docs/insights/v5/get-started) and click **Get a Key** button\\

    <img src="https://mintcdn.com/mainwp/PMb515K3nlj7x2jI/images/add-ons/62ce1ad35182.png?fit=max&auto=format&n=PMb515K3nlj7x2jI&q=85&s=0d4526d1ee42686468209f0549f4fc23" alt="Screenshot of Google PageSpeed documentation page with Get a Key button" width="653" height="304" data-path="images/add-ons/62ce1ad35182.png" />
  </Step>

  <Step title="Select existing or Create a new project and click Next">
    **Select** existing or **Create** a new project and click **Next**\\

    <img src="https://mintcdn.com/mainwp/PMb515K3nlj7x2jI/images/add-ons/69254f6a7899.png?fit=max&auto=format&n=PMb515K3nlj7x2jI&q=85&s=569f975b5b4914a8abe597c02e513a69" alt="Screenshot of project selection dialog for API key creation" width="678" height="305" data-path="images/add-ons/69254f6a7899.png" />
  </Step>

  <Step title="Copy API Key to clipboard and click Done">
    **Copy API Key** to clipboard and click **Done**\\

    <img src="https://mintcdn.com/mainwp/prJFyo89l1sl-7Fz/images/add-ons/lighthouse-settings.png?fit=max&auto=format&n=prJFyo89l1sl-7Fz&q=85&s=c8536f1f1731106a3d5b6d09bf336f13" alt="Screenshot showing generated API key ready to copy" width="650" height="349" data-path="images/add-ons/lighthouse-settings.png" />
  </Step>

  <Step title="Paste the Key to the add-on Settings." />
</Steps>

***

## Related Resources

* [Monitoring Add-ons](/add-ons/monitoring) - Browse all monitoring tools
* [Cache Control](/add-ons/performance/cache-control-extension) - Performance optimization
* [WP Rocket Extension](/add-ons/performance/rocket-extension) - Advanced caching tools
