Skip to content
This repository was archived by the owner on Nov 30, 2025. It is now read-only.

Repository files navigation

Note

This plugin is obsolete because the functionality in this plugin landed in WordPress 6.9. See section in frontend performance field guide.

Script Modules in Footer

Contributors: westonruter
Tested up to: 6.8
Stable tag: 0.1.0
License: GPLv2 or later
Tags: performance

Description

Prints script modules at wp_footer instead of at wp_head to improve performance by reducing network contention for the critical rendering path. This can be used with Script Fetch Priority Low to improve performance even more. This is only relevant for block themes.

This is a prototype for #63486 in WordPress core to test the performance impact.

Important: This moves all script modules to the footer. In WordPress core, script modules are used exclusively for the Interactivity API which uses server-side rendering, so they are safe to deprioritize by moving to the footer. However, if you have any script modules that are in the critical rendering path then you shouldn't use this plugin.

See full writeup: Improve LCP by Deprioritizing Script Modules from the Interactivity API.

Related plugin: Script Fetch Priority Low

Installation

  1. Download the plugin ZIP from GitHub or if you have a local clone of the repo, run npm run plugin-zip.
  2. Visit Plugins > Add New Plugin in the WordPress Admin.
  3. Click Upload Plugin.
  4. Select the script-modules-in-footer.zip file on your system from step 1 and click Install Now.
  5. Click the Activate Plugin button.

You may also install and update via Git Updater.

Changelog

0.1.0

  • Initial release.

About

[OBSOLETE WITH WP 6.9] Prints script modules at wp_footer instead of at wp_head to improve performance by reducing network contention for the critical rendering path. Only relevant for block themes.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages