Code

Discussion on Deactivate Plugins Per Page - Improve WordPress Performance

Discussion on Deactivate Plugins Per Page - Improve WordPress Performance

Cart 229 sales

nikolaydev supports this item

Supported

This author's response time can be up to 1 business day.

51 comments found.

This is a brilliant idea!

Are you open to freelance jobs? You seem like quite the maestro with WP and WPMultisite.

I have a project ramping up that you would be a great asset for.

Hi, thank you. I do work on freelance jobs but usually I don’t have time for additional clients, other than my main ones. Still if you want send me some more details about the task to talk about it nikolay@nikolaydev.com

Just sent you an email from my business email address. WP Project in the subject. Thanks for looking.

Thanks, got it

Hi, how does the custom URI work? For example, I have an html page domain.com/page.html and I want to make a plugin only work on this page.

I’d assume I can use “URI contains: /page.html”, right? But what if the URI is domain.com/wp-login.php?redirect_to=domain.com/page.html

It contains /page.html obviously, but it’s not the URI that I want the plugin to be enabled on.

Thank you!

Hi. The way it works is, by default all plugins are active everywhere in WordPress, so my plugin only adds deactivation rules (there is no activation rule). And there are two types, “deactivate on selected URI” or “deactivate on all except selected URI”. So if you want the plugin to only be active on one exact URI like ”/page.html” you will need to add a rule to deactivate on all except exact URI /page.html. Something to keep in mind, there are tracking parameters usually added to the URI when someone visits the page from Facebook for example, so the URI for the user may not be exactly /page.html so this is why my plugin also has an option to ignore certain parameters when it considers the rules. Another way to handles this is to change the rule to deactivate on all except if the URI starts with /page.html. But that would affect child pages if any, like if you have parent page /page/ and child page /page/inner-page/. Also keep in mind that some plugins may do some background requests on some URI you do not know, and if you deactivate it on all except the one, these requests will fail if they are GET requests, since my plugin affects GET requests, not POST requests. So there are many things you have to consider and understand well how the site works and how the plugins work and test things.

Thank you so much! Very helpful!

WEBkits

WEBkits Purchased

Hello, would you please update the plugin?

Hi, what is the reason to request an update? Is there any problem?

Hello Does this plugin work with new versions of WordPress?

Hi, yes.

This plugin is complete nonsense, no post type, no selection by post type. He says, is there anything unique? :))) Yes, there is, but that word also exists on other page types. It doesn’t happen by choosing words. You need to add the post and post types. It even needs to analyze the website and make a list of all post types.

Hi. The problem is that normal WordPress functions that are used in the code to detect certain page types will not work if we used them too early in the execution process. And to stop plugins from activating, my plugin needs to work very early. That is why it is based on the URI value, since we can get the server URI value without WordPress functions. But I have some ideas on how I could still make work the post type detection. Haven’t made it yet though.

Plugin looks good, but, for example if I deactivate Woocommerce on home page – sitemap will be empty (woocomerce sitemap), same for other plugins. In this case we have to have woo activated on home page, but I don’t need it

Hi. I haven’t tested how sitemaps work, but if you find that you need any plugin in order for them to work, you can leave it then, and focus on deactivating other plugins that don’t add pages to the sitemap. Or find other ways to make sitemaps alternatively. I don’t think that sitemaps have any importance at all for the site, but that is just my opinion. Regards.

Thank you for the response, I have working approach. In case some one also want to deactivate woo on home page and avoid missing sitemap from woo – add sitemap URL into exclusion and everything will work. Thank you for the best plugin.

Cool, that makes sense. Thanks.

Hello. Can’t define rule based on post type? For example, I want a plugin to be only in the post type (post – product).

Hello. This is one limitation at the moment, but one way to handle that is if the post type always contains something unique in the URL, like /product/, you can check that with a custom condition.

Hi brother How to use this plugin for WooCommerce products or archive pages? In normal mode, there is no trace of the product page and product archive pages in the filter list!

thanks bro. I have 2000 products and I want it to be applied to all my products. what should i do now

It depends on their URL structure. Do they have anything unique in the URL that is not contained in any other page on the site? Like /product/ for example. if yes you can create a custom URI condition that checks if this is contained.

thanks .. good job bro

Hi.

I am not sure about one thing… If i config the disable to only affect mobile devices, i have read in other comments that then this is taking the user-agent of the device. U give 2 options: desktop and mobile. What happens with tablets? are they threated as “mobile” then?

So the problem i have is i would like to deactivate a plugin in mobile only, but not in tablets, as is a menu plugin, and in tablets with horizontal view the desktop menu is needed. In mobile i am using other different menu, and the one from desktop and tablets is not needed.

Can i make some differentiation between mobile and tablets with this plugin? my web, if is of some interest for this question, is: www.international-cosmetic.com

Thx.

I have read this in wprocket documentation (read “what does mobile means for wprocket”): https://docs.wp-rocket.me/article/708-mobile-cache#third-party-cache

So even if i have the option for “separate cache for mobile devices” turned on, tablets are treated as desktop if i dont install that helper plugin.

Anyway, i understand theres a lot of cache plugins with their individual options, and also lot of developers with their differents approachs to optimize website, and what it works for me could not work for others.

So i think its impossible for you to bring a solution for ALL.

Anyway, lot of thx for ur time looking into this.

Ah, so WP Rocket can make a different cache for phones and tablets with desktops. I just assumed it cannot. Well then I will think about an idea I have and let you know if it works.

I have now prepared something that can help you. If you are still interested in this, send me an email at nikolay@nikolaydev.com so I can reply there and send you some files and instructions.

Will you add the ability to export and import plugin settings in the future?

Hi. There is a feature to export/import all rules and settings in the top right in the global actions. If you do not see it, update to the latest version.

I see now that I have not mentioned this feature on the item page, it is only in the changelog. I will add some text about it so people can know about it before buying.

Hi
is it good idea to unload the rankmath or litespeed chache from the front pages?

Hi. You mean to deactivate them with my plugin I assume. Well, it depends. Why do you want to do that, are they slowing down the page load? Also don’t you need rankmath to do changes to the front page? In general I don’t recommend deactivating caching plugins with my plugin, since they are pretty complicate, and also make changes to the htaccess file that will not be reverted with the deactivation, so the chance with some problems with them is higher.

Hi
Yes with your plugin
why rankmath should load in frontpage that users see? I mean what is reason? because the configuration of rank math is on the backend when the page is editing not in front end.
[” make changes to the htaccess file that will not be reverted with the deactivation “] you mean after configuration of your plugin , is it possible to deactive and it works because the code is in htaccess file?

Rankmath does make changes to the frontpage. It is for SEO, right? So it can make changes to titles or meta tags on the frontpage. The ways WordPress works is usually plugins hook into the load process of the page and make changes dynamically, so even if the settings are on the backend, it still needs to be active on the front-end.

About htaccess I mean that it is possible to make changes to the htaccess only when you click to save settings for example, and not dynamically as the page loads, and the htaccess affects the whole site, so not different per page. That is why I suggest to not deactivate plugins that make changes there, since it could lead to problems (like partially deactivated plugin). But everything needs to be tested of course in any case to see if all is good.

Hello Team, May I know can it be used on woocommerce product page? (https://example.com/product/product123) Thanks!

Yes, thanks. Now change all “equals” to “starts with” (or to “contains”), and remove the ?lang=zh-hant parts. See screenshot: https://nikolaydev.com/wp-content/uploads/stuff/dppp-arlun.png

That’s working if I use the “contains” or “starts with” https://ibb.co/HdhZDZM But May I know is it supported to filter level 2 menu? Like to apply it on all product-category https://example.com//product-category/ But exclude https://example.com//product-category/123

Good. But the question that you ask is a more complex condition logic that my plugin does not support. The only way to do this would be instead of “contains: /product-category/” to add all the categories except the one that you do not want like “contains: /product-category/111/”, “contains: /product-category/222/” and so on every except 123.

Hello Friend. I have a pre-purchase question, is “Discussion on Deactivate Plugins Per Page” compatible with the Avada theme? Because the famous organizer plugin didn’t work, I’m afraid to buy it and it won’t work either. Thank you very much and congratulations for your work.

Also do not deactivate the plugins that are required by the theme, they need to be active on all pages since the theme is active on all pages.

Thanks for the quick response. I’ll buy it now.

Great, no problem.

Conflict with Elementor. Impossible to create a rules. I have always an error: “Error: Could not insert rule data.”

Hi. Thank you for reporting this issue. For now I am not able to reproduce it though, I have the latest free elementor active and the latest version of my plugin active, but I can add rules with no problem. Can you help me reproduce the problem? Can you test if you still have a problem after deactivating all other plugins except my plugin and elementor, maybe it is a conflict between more plugins? Can you check if in your database in the table wp_dppp_plugin_deactivation_rules there is a column named “note”, since if it is not there, it will cause this error that you say. It should have been added with the latest version of the plugin. Can you tell me what is your PHP version and your WP version? We can talk via email as well if you prefer: nikolay@nikolaydev.com

I have released a new version that fixes this, give it a try and let me know.

There seem to be some sort of conflict with Elementor V3.3.1 and Deactivate Plugins Per Page V 1.13.0

Hi. What is the problem?

If you had problem creating new rules, I have released a fixed version now, see if that helps.

When cleaning up my database wpoption table, I found that there are alot of wpoption name: dppp-plugin-icon-ca14bb164d2be30a0c0c6d83e401771f.

Then value of it is: Not-found. Is it safe to delete this in wp-option?

Hi. If you delete them, they will be generated again when you visit the “deactivate plugins per page” rules and settings page if the option to show plugin icons is enabled. These options are generated for all the plugins that you have installed at the moment that are not on the wordpress.org library and therefor we cannot get an image for. These options say to the plugin to not constantly try to get an image. They should never grow to a very large number though, since there is only one per plugin not in the library, and I doubt you have more than a few dozen.

Hello

Are there any plans to include functionality to remove css or js files individually like asset cleanup? Regards

Hi. No, it is not an all in one speed optimization plugin. You have to use other plugins as well. It is just for managing which plugin is active on which pages.

Ok. Thanks for the prompt reply. Regards

Hi
1-Could you please compare your plugin with https://www.gabelivan.com/items/wp-asset-cleanup-pro/ ?
2-Do I need to use Cache plugin like wp-rocket or Litespeed cache with your plugin or no?
Thanks

Hi.

1. I think that the Asset Cleanup plugin can disable individual assets (css and js files), and also other features like minify, defer (you can read them on their site). My plugin only disables whole plugins on some pages, not parts of plugins.

2. I would not say that you need it, you can use one if you want, it is up to you.

In general my plugin is not an all in one optimization plugin like some plugins try to be. My plugin is only for deactivating plugins on some pages, it does not do anything else. You can use other plugins for the other optimizations.

Regards.

Is it possible to use booth of them (your plugin and asset clean up) together?

I haven’t tested every plugin out there, but it should be. If you see any issues you can contact me via the support.

Hi i am using Query Monitor and found there is many Duplicate queries from this plugin check image here https://imgur.com/a/gCboh0z

Hi. This should have been fixed in version 1.12.0, please make sure you are using that version, which is currently the latest.

Thank you for your reply. I can send you the plugin if you would like to test it. I also changed the products permalinks structure to include the categories. Now the site URL for a product is https://mydomain.com/store-collection/ready-to-ship/magnolia/. Where ready-to-ship is the slug category that I would like to block the plugin from loading

Send me an email at nikolay@nikolaydev.com with the plugin archive and I will create a testing site where you can test it along with woocommerce and my plugin.

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey