Skip to content

Test your WordPress enabled sites with Google Lighthouse using Yoast SEO sitemaps.

License

Notifications You must be signed in to change notification settings

BjornW/Vuurtoren

Repository files navigation

Vuurtoren is a set of quick 'n dirty PHP scripts to assist in testing websites with Lighthouse.

Keep in mind these scripts were developed for my own purpose. I only share these scripts so others (including myself) may learn from it. Pull requests and issues are welcomed but do not assume these scripts will be maintained.

Installation and use

  1. Install PHP CLI (at least 7.2.17) including PHP-XML (I've used Ubuntu's default packages)
  2. Install CLI version of Lighthouse using this guide.
  3. Git clone this repository
  4. Read the scripts: 'fetchSitemaps.php', 'generateURLsFromSitemaps.php' and 'runLighthouseOnURLS.php'. The last one contains the Lighthouse parameters, feel free to adjust to your own liking.
  5. Edit the sitemaps_urls.txt file with URLs pointing towards XML sitemaps
  6. Open a terminal and run: php -f fetchSitemaps.php sitemaps_urls.txt
  7. Check if the sitemaps where downloaded correctly in sitemaps
  8. In the terminal run: php -f generateURLsFromSitemaps.php sitemaps to generate files with urls for Lighthouse
  9. Check if the files are created correctly in urls
  10. In the terminal run: time php -f runLighthouseOnURLS.php urls (time is an optional command-line utility showing how long the script took)
  11. Enjoy doing something else while Lighthouse tests your website(s)

Note: You need to do this on a machine with Chrome browser installed. Chromium apparently gave errors such as NO_TRACING_STARTED

Versions used

  • Ubuntu 18.04.2 LTS
  • NPM 6.4.1 (Nodejs 10.15.3 deb from Nodesource, Ubuntu's package was older if I remember correctly)
  • Lighthouse 4.1.0
  • PHP 7.2.17

About

Test your WordPress enabled sites with Google Lighthouse using Yoast SEO sitemaps.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages