Disable Plugins On Specific Pages In WordPress w/ Perfmatters + Asset CleanUp

Disable plugins on specific pages posts wordpress

Need to disable plugins on specific pages in WordPress?

To selectively disable plugins on specific pages in WordPress, install the Asset CleanUp or Perfmatters plugin and use the script manager to disable plugins from specific content. RegEx can be used to disable plugins using URL patterns. You can also do this with CSS, JS, and fonts.

The most common example is disabling the contact form plugin on your entire website except your contact page. But it doesn’t stop there; you can disable sliders, social sharing, and affiliate link plugins where they aren’t being used. I listed quite a few common examples in this tutorial.

Disable plugins specific pages


1. Install The Asset CleanUp Plugin

Asset CleanUp and Perfmatters are two popular ways to selectively disable plugins.

Asset CleanUp is free while Perfmatters is a premium plugin by Kinsta, but Perfmatters has quite a few more speed optimization features than Asset CleanUp. For the sake of being free, I will use Asset CleanUp in the example. It has great reviews, so go ahead and install the plugin.

Asset cleanup plugin


2. Disable Unused Plugins On Specific Pages

Edit a page or post and scroll down to the Asset CleanUp section.

Now you’ll see all plugins running on the page, as well as CSS and JavaScript files from WordPress theme, core, and third party scripts. You can unload each of them on the individual page, site-wide, by post type, or using regular expressions. Note: RegEx is only included with Asset CleanUp premium and Perfmatters. There are also options for preload, async, and defer.

Most plugins have multiple CSS + JavaScript files loaded on the page. To disable them all at once, select the “Check All” option and Asset CleanUp will unload all elements for that plugin.

Asset cleanup css js manager

Another option is to disable a plugin site-wide, and only enable it on certain pages:

Disable plugins site wide


3. Use RegEx To Disable Plugins By URL

RegEx (regular expressions) let you enable/disable plugins by URL.

This is only included with the premium version of Asset CleanUp, and Perfmatters.

To disable a plugin on that page, toggle the status to off and you will have 3 options. This example uses my review schema plugin which is only used on all URLs containing the word “review.” In this case, I would use the third option: enable my review plugin on all content containing the word “review” then use RegEx to disable it everywhere else. Just one example.

Disable plugin on current URL:

Perfmatters disable plugins by url

Disable plugin using RegEx:

Perfmatters regex disable

Enable plugin using RegEx, and disable it everywhere else:

Perfmatters regex


4. Configure Asset CleanUp Settings

Asset CleanUp has a lot of other settings to help with minification, concatenation, optimizing HTML, CSS, JavaScript, hosting Google fonts locally, among many other speed optimizations.

Asset cleanup settings


5. Perfmatters

Another way to disable plugins on certain pages and posts is with Perfmatters.

Perfmatters plugin

Install the plugin, go to a page or post, and click Script Manager.

Perfmatters script manager tab

Choose to disable the plugin everywhere, on the current URL, or use RegEx:

Perfmatters disable plugins by url

Perfmatters has other speed optimizations only these (in my opinion) are much more helpful and robust than Asset CleanUp. It can help you limit post revisions, disable autosaves, host Google Analytics locally, disable WordPress heartbeat, and more. It basically takes care of the “last 10% of speed optimization.” Perfmatters was developed by Kinsta, so you know it’s good.

Perfmatters features


6. Swift Performance

Swift Performance is a cache plugin that also has an plugin organizer.

Swift performance lite plugin

You can find it in under Settings > Plugin Organizer.

Swift plugin organizer tab

There are tons of rules you can use to selectively disable plugins depending on the URL, whether it’s an Admin page, user role, and AJAX actions (helpful for WooCommerce sites).

Swift plugin organizer selections


7. Plugin Organizer

Plugin Organizer is one of the more popular ways to selectively disable plugins.

Plugin organizer

Head to settings and there are many options for selective loading plugins on admin pages, mobile, by user, and URL matching. Enable the options depending on what you’re trying to do.

Plugin organizer global settings

Here’s a screenshot of the “post type” plugin settings to give you an idea of how it works:

Plugin organizer post type plugins

Here’s a YouTube tutorial I found for Plugin Organizer:


8. Plugin Load Filter

Plugin Load Filter doesn’t have many reviews, but it’s super simple and does a great job.

Plugin load filter

Plugin Load Filter supports disabling plugins by post format type, custom post type, JetPack modules filtering, WP embed content, and URL filtering. Just go into the settings and toggle where you want each plugin to be disabled. It also has a few additional settings shown below.

Plugin load filter settings


9. Freesoul Deactivate Plugins

Freesoul Deactivate Plugins is another good option.

Freesoul deactivate plugins

Just like you would with the other plugins, heading to the settings, select the type of content you want to edit (top tab), then enable or disable plugins on that content by toggling each one.

Freesoul deactivate plugins post types

Here’s a glimpse of the custom URL settings:

Freesoul deactivate plugins custom url


Frequently Asked Questions

🔌 Which plugins let you selectively disable plugins?

Asset CleanUp and Perfmatters both let you selectively disable plugins from running on certain pages/posts. Asset CleanUp is free and Perfmatters is a premium plugin by Kinsta.

🔌 How do you use Regex?

Regex can be used with Perfmatters or Asset CleanUp's premium version. You can use it to disable plugins on specific URLs, for example all URLs including the word Review, or even category URLs.

🔌 Will selectively disabling plugins speed up my site?

Yes, it can significantly speed up your site. By looking at all plugins, scripts, and styles (eg. in Asset CleanUp) and comparing them to your GTmetrix Waterfall report, you can usually find and fix many plugins slowing down your site.

🔌 Which types of plugins take longest to load?

Social sharing, statistic, sliders, portfolios, page builders, calendars, chat, contact forms, related post are the most common culprits. I have a full list of 70+ common slow plugins.


Which One Do I Use To Disable Plugins On Pages?

I personally use Perfmatters by Kinsta since it’s very easy to use, comes with RegEx, and it also has tons of other miscellaneous optimizations that aren’t handle by WP Rocket (the cache plugin I use). The only speed plugins I have on my site are WP Rocket, Perfmatters, ShortPixel, and Breeze by Cloudways. Between these, that’s all you need to get 100% GTmetrix scores.

Have a question? Hit me up in the comments.


You Might Also Like:


  1. I appreciate your article! Good stuff. Just a note: I had to ask for a refund for PerfMatters and it looks like I’ll have to switch to Asset CleanUp.

    I use Simple Custom CSS & JS for custom CSS, and Perfmatter forces either disabling the custom CSS plugin or leaving it alone, while Asset CleanUp allows individually disabling custom CSS on a per page/post basis.

    PerfMatters support was good and friendly. They confirmed there’s no option for me to selectively control my custom CSS, unfortunately.

  2. Even I am using Breeze for a couple of months. It works well and free.
    Does Breeze give good performance with wp-rocket?
    And Last one..
    Is Perfmatters lightweight plugin?

    • Perfmatters is lightwight, yes. I personally use WP Rocket on Cloudways, not Breeze. They need to make some improvements in Breeze if they want it to replace WP Rocket. It lacks too many features now.


Leave a Comment