WP Manifestindependent plugin directory
manifest / performance / pagelean

Pagelean - Conditional Script and Style Loading

Conditional script & style loading for WordPress - dequeue assets per page for a lighter, faster front end.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/wppoland/pagelean/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Dequeue individual scripts and styles on the pages that do not need them. Fewer requests, lighter pages, faster loads - using WordPress core.

Description

Most plugins load their CSS and JavaScript on every page, even where their feature never appears. A contact form script on your checkout, a slider stylesheet on your blog posts, a social-share bundle on your privacy policy. That weight slows every visit.

Pagelean lets you remove a specific script or style from exactly the pages where it is not needed - front page, blog index, single posts and pages (by ID), single entries of a post type, the WooCommerce shop, product, cart and checkout pages, or by device. It uses the standard WordPress enqueue system (wp_dequeue_script / wp_dequeue_style), so there is no page-builder lock-in and nothing proprietary to learn.

What it does

  • Remove any registered script or style handle by name.
  • Choose where it is removed: everywhere, the front page, the blog posts index, single posts/pages (by ID), single entries of any public post type, the WooCommerce shop, product, cart or checkout page (when WooCommerce is active), or only mobile / only desktop.
  • Test mode: the rules apply only to logged-in administrators while everyone else gets the untouched page, with a notice in the admin until you turn it off.
  • Dequeue by default; tick "Also deregister" on a rule only when you want the handle gone even where another script depends on it.
  • Autocomplete from the handles your front-end pages actually load, recorded while you browse the site as an administrator (up to 500, with their source file).
  • Runs late on the front end so it removes handles reliably, and never touches the admin.

What it does not do

It does not minify, combine or defer. It removes what you tell it to remove - nothing automatic, nothing hidden. Removing a handle that another script depends on can break functionality, so change one rule at a time and check the front end.

Part of the Plogins family

Pagelean is one of a family of small, focused WordPress and WooCommerce plugins by WPPoland. Learn more at plogins.com.

Installation

  1. Upload the plugin to /wp-content/plugins/pagelean, or install it from the Plugins screen.
  2. Activate it.
  3. Go to Pagelean in the main admin menu.
  4. Add a rule: type the handle, pick script or style, and choose where to remove it.
  5. Save, then check the front end.

Frequently Asked Questions

How do I find a handle name?

Visit a few pages of your site while logged in as an administrator. Pagelean records the scripts and styles each page loads and offers them as autocomplete in the Handle field, with the file each one loads. You can still look it up by hand: the id attribute of a `