Deactivate Plugins for Posts and Pages with Plugin Load Filter

Categorized as WordPress Tips
Plugin Load Filter Logo

What is Plugin Load Filter?

Plugin Load Filter is a WordPress plugin that allows you to deactivate unnecessary plugins for each individual post and page. We usually recommend against using most plugins, but the great news is that this plugin works great with Ezoic and is extremely lightweight. By using native PHP and WordPress configuration features and code this plugin is simply saving you development and custom coding time by making these things available in a simple user interface.

By filtering out plugins for certain pages and posts, you can speed up your website significantly.

Plugin Download

Plugin Load Filter

Upload the zip file into the Add Plugins tab and activate it

How to use Plugin Load Filter

First, download the plugin zip file for Plugin Load Filter from above. You can also search for the plugin, but we’ve included the download link to make sure the right one is installed for you.

After choosing the file and clicking install now, you will then be redirected to this page that lets you know that the plugin was installed successfully. Go ahead and click activate plugin once it is installed.

Head over to the plugin tab and click on Plugin Load Filter. You will then see the current settings of the plugin under Filter Registration and Page Type Activation.

Removing Code From Plugins From Pages It’s Not Used On

Under Filter Registration, you will see the default settings set to Normal under Page Type Filter for all the plugins that are installed on your website. The Normal setting excludes the plugins from the Page Type Filter. By selecting Admin Type, you are registering the plugins to be used only in the admin page. By selecting Page Type, you are registering the plugins for selecting whether to activate each Page type or Post. Page Type registration plugins are once blocked, but is activated by Page Type Activation setting which is the next tab you see next to Filter Registration.

In our case, we selected Admin Type for WordPress Importer Plugin so it’s only used in the admin page and Page Type for the WPForms Lite Plugin. Also click the checkmark for Add a link to admin bar for displaying the plugins filtered status. By clicking the Page Type Filter, our WPForms Lite plugin is blocked on all pages but we can activate the plugin on various pages in the Page Type Activation tab once we click Filter Entry to register our new settings.

The plugin has a very simple user interface. All you have to do is click on the plug button for the plugins you want to activate for the specific page type. After selecting the page type, you can click activate plugin entry. You can also have more control on which pages you activate the plugin by going to the page or post’s content editing screen. The Plugin Load Filter settings will appear in the content editing settings for the specific page or post.

Note: You will not see the settings for activating and deactivating unless the Page Type Setting was selected in Page Type Filters earlier. If you downloaded the plugin and no settings were selected, you will see no option because the Page Filter was not registered.

Deactivating plugins by page saves your site speed

The settings for the plugin are very simple and your website should now activate or deactivate plugins based on your settings. In our example, we deactivated only the WPForms Lite Plugin on certain pages, but you can deactivate and adjust the settings for several plugins. The process is very quick and your website should now filter out plugins from loading on every page.

In fact, you can do this in a more granular way by activating the admin bar feature in the plugin.

disable plugins by page

This provides the ability to navigate to pages on the front-end of your website while logged into your wp-admin and then use the Disable Plugins bar to identify which plugins are active and disabled on a page-by-page and post-by-post basis. Simply copy/paste specific line items from deactivated to activated or visa versa when using the admin bar to control things on a page-level basis.

This simple, yet easy-to-use plugin is lightweight and simply takes advantage of Filtering language in PHP to offload needed and unneeded code that plugin developers almost always don’t go through the trouble of building into their plugins. Now, your site can be saved from their short-cuts.