How To Disable Plugins On Specific Pages + Posts In 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 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.

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

 

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 65+ 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.

Tom

Subscribe
Notify of
guest
2 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments