Articles of deactivated plugin

Does Deactivating a Plugin Help Anything?

Does deactivating a plugin help with any performance on your website? I mean is it worth deactivating plugins that you don’t use constantly? Does uninstalling a plugin make any difference from deactivating a plugin?

Programmatically disable W3 Total Cache in development environment

I’ve got two environments in my project: dev & production. I just want to be able to deactivate or disable W3TC in my dev environment but the plugin has no native support for this . I also can’t find a deactivate hook that works with the plugin and setting define(‘WP_CACHE’, false); based on HTTP_HOST seems […]

Plugin Deactivate Self on Activation Errors

Hi I’m wondering if someone can point me in the right direction here. I’m having trouble figuring out how deactivate_plugins() works. I’ve been using variations of the below for awhile now and it’s always seemed to work until recently. register_activation_hook(__FILE__, ‘my_plugin_activate_deactivate’); add_action(‘after_switch_theme’, ‘my_plugin_activate_deactivate’); function my_plugin_activate_deactivate() { if ( !function_exists (‘mythemename’) { deactivate_plugins( plugin_basename(__FILE__) ); } […]

Why does deactivating a plugin cause error: “You do not have sufficient permissions to access this page”?

We recently deactivated the bbPress plugin because we don’t use it anymore. Immediately following that, no admin users can get into the dashboard without hitting the infamous: “You do not have sufficient permissions to access this page?” We tried removing ALL plugins to rule out a dependance from one of those, but it didn’t work.

Many plugins making WordPress run slow by design?

So this is what I’ve read: Many plugins might get WordPress slow if they are activated Many plugins might get WordPress slow even if they are not activated!? An example Let’s say I build a large plugin and activate it in WordPress. Later on I figured it would be better to split the plugin into […]

admin_notices after register_uninstall / deactivate_hook

I’ve successfully added admin notices to display on register_activation_hook, and when the plugin updates, but I’m not seeing any way to display admin_notices after the uninstall or deactivation hooks. Is this at all possible? Alternatively can use javascript at this stage? (yes sort of). EDIT: To answer @G. M. I’ve already read the docs and […]

deactivated_plugin hook: get the name of the plugin

I would like that every time any plugin previously activated, a function from my plugin be called, returning (at least) the name of the plugin, or something that allows to identify it (file name?). I figured i could use the action hook “deactivated_plugin” but i’m wondering what information from the desactivated plugin is actually available?

Show a confirm message before plug-in activation

I want to display a message when the user try to activate my plugin. This message will ask if him really wants to activate the plugin or, if him change his mind, cancel the activation. How can I accomplish that? This is the code for the warning message just for reference. — UPDATED CODE — […]

Delete tables from database when deleting plugin

I created a plugin and want to add a function to delete my tables from the database when a user deletes my plugin. I created a function that deletes tables from the DB when a user deactivates my plugin, but I don’t want that. Here is the code: // Delete table when deactivate function my_plugin_remove_database() […]