How To Disable Plugins on Specific Pages In WordPress

Disable Plugins Specific Pages

Need to disable plugins on specific pages in WordPress?

You can do this using a plugin like Asset CleanUp or Perfmatters. By disabling unused plugins, scripts, and styles on specific content types, this means fewer HTTP requests and a faster site.

The most common example is disabling your contact form plugin on your entire site 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.


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. But for the sake of 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 Check All

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 examples 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.

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


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.


span,.wp-review-59715.wp-review-percentage-type .review-list li>span{display:inline-block;position:absolute;z-index:1;top:32px;left:45px;color:#ededed;font-size:14px;line-height:1;text-shadow:0 1px 1px rgba(0,0,0,.3);-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wp-review-59715.wp-review-point-type .wpr-user-features-rating .review-list li>span,.wp-review-59715.wp-review-percentage-type .wpr-user-features-rating .review-list li>span{color:inherit;text-shadow:none}.wp-review-59715.wp-review-point-type .wpr-user-features-rating .review-list li .wp-review-input-set+span,.wp-review-59715.wp-review-percentage-type .wpr-user-features-rating .review-list li .wp-review-input-set+span,.wp-review-59715.wp-review-point-type .wpr-user-features-rating .review-list li .wp-review-user-rating:hover+span,.wp-review-59715.wp-review-percentage-type .wpr-user-features-rating .review-list li .wp-review-user-rating:hover+span{color:#fff}.wp-review-59715 .review-list li:nth-child(even){background:#fff}.wp-review-59715 .review-links{padding:30px 30px 20px 30px} .review-result-wrapper i{font-size:18px} .review-pros-cons{clear:both;padding:0;border-top:1px solid #fff} .review-pros-cons .review-pros, .review-pros-cons .review-cons{width:100%;flex:none;padding:0} .review-pros-cons .review-pros{background:#2c3fd3;padding:30px 30px 10px 30px;color:#fff;box-sizing:border-box} .review-pros-cons .review-cons{background:#5e1d9a;padding:30px 30px 10px 30px;color:#fff;box-sizing:border-box} .mb-5{text-transform:uppercase} .mb-5+p{line-height:26px}.wp-review-59715 .user-review-area{padding:15px 30px;border-top:1px solid}.wp-review-59715 .wp-review-user-rating .review-result-wrapper .review-result{letter-spacing:-2.35px} .review-title{letter-spacing:1px;font-weight:700;padding:15px 30px;background:transparent} .review-total-wrapper{width:40%;margin:0;padding:35px 0;color:#fff;background:#ededed;border-left:1px solid;text-align:center;float:right;clear:none;border-top:1px solid} .review-list{clear:none;width:60%;float:left;border-top:1px solid} .wpr-user-features-rating, .wpr-user-features-rating .review-list{width:100%;clear:both;border-top:1px solid #fff} .review-total-wrapper{padding:20px 0} .review-total-wrapper{margin:auto 0;padding-top:10px;width:auto;height:100%;clear:both} .user-review-area{padding:12px 30px} .review-list{width:100%} .review-result-wrapper{border-radius:25px} .review-percentage .review-result-wrapper, .review-percentage .review-result, .review-point .review-result-wrapper, .review-point .review-result{height:26px;margin-bottom:0;background:#fff;border-radius:25px} li .review-point .review-result{background:#5e1d9a} li:nth-of-type(2n) .review-point .review-result{background:#2c3fd3}.wp-review-59715 .review-total-wrapper,.wp-review-59715 .review-total-wrapper{width:70%;display:inline-block;margin:20px auto 0 auto} .review-total-wrapper .review-total-box{float:left;text-align:center;padding:0;color:#424242;line-height:1.5} .review-total-wrapper .review-total-box h5{margin-top:10px;color:inherit} .review-total-wrapper .review-total-box, .review-total-wrapper .review-total-box{width:100%}{color:#fff;margin-top:10px} .user-review-title{padding:15px 30px 10px;margin:0;color:inherit;background:#fff;border-top:1px solid;border-bottom:1px solid} .user-total-wrapper .user-review-title{display:inline-block;color:#424242;text-transform:uppercase;letter-spacing:1px;padding:0;border:0;background:transparent;margin-top:3px} .user-total-wrapper h5.user-review-title{margin-top:12px} .user-total-wrapper span.user-review-title{margin-top:8px} .reviewed-item{padding:30px} .review-total-wrapper>.review-total-box{display:block} .review-total-wrapper>.review-total-box>div{display:none} .user-review-area .review-percentage, .user-review-area .review-point{width:20%;float:right;margin-bottom:5px}.wp-review-59715 .review-embed-code{padding:10px 30px},.wp-review-59715 .review-title,.wp-review-59715 .review-list li,.wp-review-59715 .review-list li:last-child, .review-list,.wp-review-59715 .user-review-area, .review-total-wrapper,.wp-review-59715 .reviewed-item,.wp-review-59715 .review-links,.wp-review-59715 .wpr-user-features-rating, .user-review-title{border-color:#fff}.wp-review-59715 .wpr-rating-accept-btn{background:#5e1d9a;margin:10px 30px;width:-moz-calc(100% – 60px);width:-webkit-calc(100% – 60px);width:-o-calc(100% – 60px);width:calc(100% – 60px);border-radius:50px}@media screen and (max-width:480px){ .review-title, .reviewed-item, .review-list li, .review-desc, .user-review-area, .review-embed-code{padding:15px}.wp-review-59715.wp-review-circle-type .review-list li{padding:15px 15px 0 15px} .review-pros-cons>div>div{padding:15px;padding-top:0} .ui-tabs-nav{padding:0 15px} .review-links{padding:15px 15px 5px} .review-list, .review-total-wrapper{width:100%} .review-total-wrapper{padding:10px 0} .review-total-wrapper .review-total-box h5{margin-top:0} .review-total-wrapper .review-total-box div{line-height:1}}]]>

Keep reading the article at Tom Dupuis. The article was originally written by Tom Dupuis on 2020-01-19 17:52:09.

The article was hand-picked and curated for you by the Editorial Team of WP Archives.

Disclosure: Some of the links in this post are "affiliate links." This means if you click on the link and purchase the product, We may receive an affiliate commission.

Leave a Comment

Your email address will not be published. Required fields are marked *

Show Your ❤️ Love! Like Us
Scroll to Top