🏳️Weston Ruter - Building a Better Web

Website faviconweston.ruter.net

Weston Ruter's blog about web development, AMP, WordPress, linguistics, etc.

[Skip to content](#wp--skip-link--target)

Blog

====

*   [Eagerly Prerender Key URLs with Speculative Loading in WordPress](https://weston.ruter.net/2025/03/07/eagerly-prerender-key-urls-with-speculative-loading-in-wordpress/)

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    [](https://weston.ruter.net/2025/03/07/eagerly-prerender-key-urls-with-speculative-loading-in-wordpress/)

    [March 7, 2025](https://weston.ruter.net/2025/03/07/eagerly-prerender-key-urls-with-speculative-loading-in-wordpress/)

    Speculative Loading is coming to WordPress 6.8. The Speculation Rules API enables browsers to prefetch or prerender URLs so that pages can load much faster for users. Prefetching can reduce your TTFB to zero, and prerendering can reduce your LCP to zero: instant navigation! As explained in Prerender pages in Chrome for instant page navigations,…

*   [Boosting Performance with Optimization Detective](https://weston.ruter.net/2025/02/21/boosting-performance-with-optimization-detective/)

    -----------------------------------------------------------------------------------------------------------------------------------------

    [](https://weston.ruter.net/2025/02/21/boosting-performance-with-optimization-detective/)

    [February 21, 2025](https://weston.ruter.net/2025/02/21/boosting-performance-with-optimization-detective/)

    At WordCamp Asia 2025 today in Manila, I gave a talk about the future for how performance optimizations can be implemented in WordPress today via the Optimization Detective feature plugin. This project has been the focus of my work for the past 1½ years on the WordPress Core Performance Team. Here’s my talk from the…

*   [My Portland Picks](https://weston.ruter.net/2024/09/12/my-portland-picks/)

    ---------------------------------------------------------------------------

    [](https://weston.ruter.net/2024/09/12/my-portland-picks/)

    [September 12, 2024](https://weston.ruter.net/2024/09/12/my-portland-picks/)

    I was surprised and delighted at the decision that WordCamp US would be held in my hometown of Portland, Oregon this year–and next year too! Since so many of my teammates and colleagues converge for this yearly event, I really hope everyone gets a chance to enjoy aspects of the city I love. To that…

*   [Ergonomically Running WP-CLI in wp-env](https://weston.ruter.net/2024/09/03/ergonomically-running-wp-cli-in-wp-env/)

    ---------------------------------------------------------------------------------------------------------------------

    [](https://weston.ruter.net/2024/09/03/ergonomically-running-wp-cli-in-wp-env/)

    [September 3, 2024](https://weston.ruter.net/2024/09/03/ergonomically-running-wp-cli-in-wp-env/)

    Something that has always annoyed me is how verbose it is to run WP-CLI commands in wp-env projects. For example, to list out all posts: The “npm run wp-env run cli” part I have to copy for each command, and I often forget the right order or miss a component. It gets worse when needing…

*   [Repairing wp-env’s Testing Database](https://weston.ruter.net/2024/08/17/repairing-wp-env-testing-database/)

    -------------------------------------------------------------------------------------------------------------

    [](https://weston.ruter.net/2024/08/17/repairing-wp-env-testing-database/)

    [August 17, 2024](https://weston.ruter.net/2024/08/17/repairing-wp-env-testing-database/)

    Sometimes when I interrupt PHP unit tests in a wp-env environment I end up getting the database in a bad state so that the next time I try to run tests I get: I then have to re-remember what I do to fix this every time, so I’m blogging it so I won’t have to…

*   [Running PHPUnit Automatically During Development](https://weston.ruter.net/2024/01/12/running-phpunit-automatically-during-development/)

    -----------------------------------------------------------------------------------------------------------------------------------------

    [](https://weston.ruter.net/2024/01/12/running-phpunit-automatically-during-development/)

    [January 12, 2024](https://weston.ruter.net/2024/01/12/running-phpunit-automatically-during-development/)

    Recently I’ve been working on writing unit tests for a new module for the Performance Lab plugin. I realized my workflow was not particularly refined: I kept making a change to the codebase and then switching over to the terminal to re-run PHPUnit by hitting ↑ and Enter. I figured this should be done automatically…

*   [Running the WordPress Plugin Directory Slurper](https://weston.ruter.net/2023/07/01/running-the-wordpress-plugin-directory-slurper/)

    -------------------------------------------------------------------------------------------------------------------------------------

    [](https://weston.ruter.net/2023/07/01/running-the-wordpress-plugin-directory-slurper/)

    [July 1, 2023](https://weston.ruter.net/2023/07/01/running-the-wordpress-plugin-directory-slurper/)

    As part of my work on the WordPress Core Performance Team, I need to do analyses on the plugins in the WordPress Plugin Directory. For example, in WordPress 6.3 we’re finally shipping first-party support for adding async and defer to scripts (a 13-year old ticket). In this case, the excellent WordPress Directory Searcher (WPdirectory) is…

*   [Comparing Markup with PHPUnit](https://weston.ruter.net/2023/07/01/comparing-markup-with-phpunit/)

    ---------------------------------------------------------------------------------------------------

    [](https://weston.ruter.net/2023/07/01/comparing-markup-with-phpunit/)

    [July 1, 2023](https://weston.ruter.net/2023/07/01/comparing-markup-with-phpunit/)

    For the upcoming WordPress 6.3 release, I’ve been contributing to the introduction of script loading strategies (i.e. the async and defer attributes). In the WP\_Scripts class, all of the script tags are manually assembled with printf() & sprintf(), and as part of that work I wanted to start making use of helper functions that assemble…

*   [Twitter Account Locked](https://weston.ruter.net/2022/12/01/twitter-account-locked/)

    -------------------------------------------------------------------------------------

    [](https://weston.ruter.net/2022/12/01/twitter-account-locked/)

    [December 1, 2022](https://weston.ruter.net/2022/12/01/twitter-account-locked/)

    Update: After more than three weeks, my account was unlocked. A few days ago, National Weather Service Portland tweeted: I replied: @NWSPortland Don’t forget graupel! BTW, I caught something frozen falling this afternoon in downtown. I also included a video of frozen precipitation bouncing off of a window ledge downtown. Now, if you don’t know:…

*   [Sandboxing with Partytown](https://weston.ruter.net/2022/11/30/sandboxing-with-partytown/)

    -------------------------------------------------------------------------------------------

    [](https://weston.ruter.net/2022/11/30/sandboxing-with-partytown/)

    [November 30, 2022](https://weston.ruter.net/2022/11/30/sandboxing-with-partytown/)

    Partytown is a “library to help relocate resource intensive scripts into a web worker, and off of the main thread. Its goal is to help speed up sites by dedicating the main thread to your code, and offloading third-party scripts to a web worker.” Code running in a worker runs in a separate thread, ensuring…