Code Unloader

Reading Time: 4 minutes

The smart WordPress Code Unloader for faster pages

Code Unloader gives WordPress administrators surgical control over which JavaScript and CSS assets load on each individual page — using exact URL, wildcard, or regex rules.
Easily group unloaded assets and export rules for future use.
Keep your website bloat-free and fast.

PHP 8.0+ required WordPress 6.2+

How to use Code Unloader
Code Unloader plugin icon
Code Unloader Assets

Features

Precise control. Zero bloat.

Every feature in the Code Unloader plugin is designed to give you control without complexity. Advanced, lightweight, free to use, and powerful solution with one task only — unload bloat from your WordPress pages. And all of that in a <300 KB package unpacked.

🎯

Per-URL Asset Rules

Exact, wildcard (/shop/*), and regex URL matching. Rules survive cache flushes and plugin reactivations.

Frontend Panel

Slide-in panel from Admin Toolbar. Open on any page with ?wpcu — even on pages that hide the toolbar.

🧠

Smart Matching

Use exact URLs, wildcards, or regex to target precisely where assets should stop loading.

📱

Device-Type Rules

Target desktop-only or mobile-only asset loading. Serve exactly what each device needs.

📁

Rule Groups

Organise rules into named groups. Enable or disable an entire group at once — no page reload needed.

📋

Full Audit Log

Every rule change is logged. Export and import all rules as clean JSON for backup or migration.

🔧

Inline Script Detection

Detect inline <script> and <style> tags not registered through WordPress’s enqueue system.

🔍

Conditional Rules

Rules for logged-in users, WooCommerce pages, specific shortcodes, or post types.

📊

Live Size Tracking

See exact KB unloaded per URL in the stats bar. Instantly know the real impact of every rule.


How It Works

Up and running in minutes

No PHP, no child theme edits. Just the Admin Toolbar and a toggle switch.

1

Open the panel

Navigate to the page you’d like to unload code from. Click ⚡ Assets in the Admin Toolbar or add ?wpcu to any URL.

2

See every asset

JS and CSS files are listed by plugin, theme, or WordPress Core — with file sizes.

3

Toggle to disable

Set scope, match type, device target, and conditions in the rule dialog.

4

Rules stored in database

Saved in a custom DB table — unaffected by cache flushes or plugin updates.

5

Easily revert changes

Delete any rule with one click from the panel or admin screen, use a kill switch, or deactivate the plugin — assets load normally again.

Speed Analyzer

Want to measure the impact of your changes?

Test your website speed with our free Speed Analyzer tool — an all-in-one WordPress performance dashboard that identifies bottlenecks, compares before/after results, and generates PDF reports.


Compatibility

Works with your entire stack

Code Unloader operates at the WordPress enqueue layer — before caching, CDNs, or page builders ever see the request. It coexists cleanly with every major performance plugin.

Cloudflare CDN
🧊W3 Total Cache
FlyingPress
🛡WP Super Cache
🛒WooCommerce
🔷Elementor
🌿Divi
🚀WP Rocket
Perfmatters
Cloudflare CDN
🧊W3 Total Cache
🟠LiteSpeed Cache
FlyingPress
🛡WP Super Cache
🛒WooCommerce
🔷Elementor
🌿Divi

⚠️

Warning — unloading assets can break your website functionality or visuals!

Although you can easily revert changes made by Code Unloader, it’s prudent to test it on the staging area first. Use Code Unloader at your own risk.
And if you’d like us to optimize your website speed, feel free to check our WordPress speed optimization service.


FAQ

Frequently asked questions

Answers to common questions about the Code Unloader WordPress plugin.

Q

Will rules survive a cache flush?

Yes. Rules are stored in a custom database table and are completely unaffected by caching plugin cache clears or plugin reactivations.

Q

What does the kill switch do?

It’s a one-click emergency recovery in Settings. When active, all rules are bypassed sitewide — assets load normally. Your rules are not deleted; they resume when you deactivate it.

Q

What are Rule Groups and how do they help?

Rule Groups let you organise related rules under a single name. You can enable or disable an entire group at once from both the admin screen and the frontend panel.

Q

Can I export and import my rules?

Yes. Full JSON export and import of all rules, including group assignments. On import, existing groups are matched by name to avoid duplicates.

Q

Does it support regex URL matching?

Yes. Choose Regular Expression as the match type when creating a rule. Patterns are validated before saving, with a warning to help you keep them specific.

Q

What PHP version is required?

PHP 8.0 or higher. The plugin uses modern PHP features such as union types and match expressions that are not available in PHP 7.x.

Download the Code Unloader today

Free WordPress code unloader plugin — available on the official WordPress.org repository.

100% free · GPL-2.0 licensed · No account required