Code

Discussion on Deactivate Plugins Per Page - Improve WordPress Performance

Discussion on Deactivate Plugins Per Page - Improve WordPress Performance

5.00 (17 ratings) 5.00 stars
Cart 153 sales
Recently Updated

nikolaydev supports this item

Supported

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

39 comments found.

This plugin is amazing, thank you so much.

The only important feature that seems to be missing is the ability to select the backend only for custom urls.

For example: “deactivate on all backend pages where url doesn’t contain”

Hi.

Thank you too. I will have to add an option to choose per rule separately if it affects back-end or front-end or both. I am writing this down in my file with new features to add. But I cannot say when it will be done. I will write a comment here when it is though.

Regards.

When this plugin is network activated on multisite, can we control all the blogs at once?

We should fix this too. Unexpected response should never happen. So after which action it happens exactly? After saving the plugin settings? Or after adding a rule?

After adding a rule.

OK, I sent you a version that will show the response so we can see it. Please screenshot it and send me to see. Regards.

On the latest WP update 5.3.2 this plugin started messing up with my plugins and deactivated them randomly. It isn’t working now, which is a bummer because it had been working great all year.

I wouldn’t recommend it for newer installs.

Hi.

Sorry to hear that. But that is very unlikely, since the 5.3.2 update is very minor, and also looking at the changes I don’t see how any of them could affect my plugin. Maybe something else is going on, and just happened after you updated. Please confirm that the 5.3.2 is the problem by going back to 5.3.1. You can download it https://wordpress.org/wordpress-5.3.1.zip, extract it, and upload all files and folders except the “wp-content” folder to your server. This will downgrade you to 5.3.1. Of course make a backup first just in case. Check if that solves the problem (just so we know, I am not suggesting to stay with that version).

Also I am not sure exactly what is being deactivated and when. I don’t think it is random though. It is best to test with just one other plugin activated, and just one deactivation rule first. So it is a simple environment, where you can easily see what is going on. Use the debug mode in my plugin to see on the front-end which plugin is active.

Sometimes when you deactivate a plugin, that is needed by other plugins, they get deactivated as well, because they cannot work without it. These plugins that work together you need to put in a group and add rules only to the group, so they are deactivated together. For example all WooCommerce add-ons require WooCommerce.

If you prefer, send me (nikolay@nikolaydev.com) access to your site to do some testing, but also tell me in more detail how to first see the problem on your site (what happens and when that is the problem).

Regards.

Is there a way to deactivate on all except more than one URI which “does not contain”? Whenever I select 2 all but uri “which does not contain”, the deactivation stops working everywhere.

What I’m trying to do is prevent it from running on the frontend at all, but I have two different admin dashboard urls. (“wp-admin” and “dashboard”)

I don’t want anything deactivated on the frontend. I want everything deactivated on the backend only except for certain pages on the backend.

I use deactivate on all except for “uri does not contain wp-admin” and it works, but adding another rule “uri does not contain dashboard” along with the first rule causes the rules to not take effect.

Ah, I think I understand now. I Thought you wanted to prevent the plugin from running on the front-end, but you want the rules to not run on the front-end. And you have two different dashboard strings to consider. Yes, this seems impossible then in the current plugin. Let me think a little about what feature I need to add for that to be possible.

I sent you an email (I have it from before) with a way to do that before I release the update that has the feature. Regards.

Hello, is there any chance to create something like that. When you have the debugger enable except for what active plugins are to show the amount of time the plugin took to load when you visit a page?

For example you go to home page and the debugger shows Contact Form enabled and next to it (0.3sec to load) something like that and make it optional to enable or disable just like debugger.

Thank you.

Hi. That sounds very cool, but I don’t think it is possible. Plugins hook into many different points in the loading process and add their PHP code, also do MySQL queries, also add static files to be loaded, all these things add to the loading time. It is not one action that happens all at once and loads the plugin that we can measure. It is too complicated, sorry.

Hi,

Your plugin doesn’t seem to be working for custom post types such as blog articles, products from woocommerce and more.

Or am i missing something?

Hi. I assume you want to make a rule that targets all of that custom post type (or do you mean something else?) You can target products with a custom URI selection rule that affects all URI that contain /product/ for example. You wouldn’t be able to do that only for a post type that does not contain a unique word in the URI, which also depends on the permalink settings (usually normal posts if they only contain the post name). Give me an example of what are you trying to do exactly and how does your URI look like.

Hi,

Yes I wanted to make a rule that target custom post types.

For example: I am using woocommerce and my urls are customized (there is no /shop/ or /product/) prepending the URL of the product. Thus I need a to deactivate plugins like elementor, contact form 7 and more for “products and post custom post types”. Now its currently not possible with your plugin.

Something like this but also include products—> https://share.getcloudapp.com/OAuB9rPp

My plugin works with the URI, if there is no change in the URI, you cannot target these posts. The reason for this is because in order to deactivate other plugins my plugin needs to work before they even begin to load. That early in the load process WordPress does not allow me to detect post types and other types of pages in the normal way. Also some post types don’t even exist yet, since plugins create them later.

So in order to be able to detect post types the plugin would have create a database table with all posts and their URIs and constantly update it on changes, and always check in that table which URI is for which post type. And this is a complicated and not so good way of doing it. Basically there is no good way of doing that, because of how the WordPress load process works. I may end up do it eventually in this not so good way, but for now I haven’t decided to do this feature.

This is an amazing plugin! I use it all the time. And Nikolay’s support is awesome!

Thanks :)

Do you plan to add the functionality of disabling by post type?
Say for instance you have multiple post types but one in particular, you wanted to disable Contact Form 7 or elementor, but all of them has a similar url structure to wordpress native posts or page. ie, no /product/, /ad/ /car/ /recipe/ etc.

Hello. I know that this has been highly requested, but I would have to say no for now. Due to two main reasons. First, there is not a good way to do this, since normal WordPress functions to detect this are not working when we run code so early before other plugins start. But there is one more complicated way, just not a good way. Secondly, due to my regular work (not related to my plugins) I don’t have time to develop big new features for my plugins unfortunately.

Hello. Consider adding a feature to disable the plugins for a specific user role. We want to debug something and disable plugins from the admin user but don’t want to break the normal users experience. Thanks.

Hi again. In the new 1.12.0 version now I added the feature to enable Local Mode which would make all rules to only affect your device. This should help you with testing (I cannot detect users so early in the WordPress loading process, because they are not loaded yet, so I made it like this). Regards.

Thank you very much. It works. You are amazing. Keep up the good work!

Awesome, thanks.

Hello

you have great plugin here

but i need to ask you it this plugin work with caching plugins like (wp rocket)?

what I would to know exactly when wp rocket cache all js and css

how your plugin will work and disable some plugins in some pages

did you understand what I mean?

Hello, thank you. Caching plugins create different js and css files for different pages if there are any differences in the code. So this will still work.

Pre-sale question: I’m having a problem with a plugin that is affecting Woocommerce variable product type. We can’t select the variation. I would like to deactivate it under a specific category. Is that possible with your plugin without affecting the check out?

Hello.

Do you mean to deactivate a plugin on product pages when the product has a certain category or do you mean on the category page? My plugin needs your URLs to have something unique so it can detect the category, because it can only work based on the URL. So if you are talking about products from a certain category, the products must have the category slug in the URL so the plugin can see the category in the URL. If your products are only with product name in the URL, then it will not be able to detect the category. And if you are talking about a single category page, then it is fine.

Also keep in mind that there are many plugins and I cannot say for sure if the plugin you are talking about will work correctly when deactivated on some pages, some plugins are required by the theme for example and need to be always active, but in most cases it will work.

I can send you a testing site where I can upload my plugin and you can upload the other plugins and test it if you want. Send me an email at nikolay@nikolaydev.com if you want that so I can respond with a link to a temporary testing site.

Regards.

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.

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.

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.

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

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.

zipwebs

zipwebs Purchased

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.

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.

acfj Purchased

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.

acfj Purchased

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

Great, no problem.

by
by
by
by
by
by