Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
110 votes
2 answers
62k views

Uninstall, Activate, Deactivate a plugin: typical features & how-to

I'm making a WordPress plugin. What are typical things I should include in the uninstall feature? For example, should I delete any tables I created in the install function? Do I clean up my option ...
redconservatory's user avatar
6 votes
4 answers
6k views

Best practice way to delete user meta data during plugin uninstall?

If a plugin stores data in the usermeta tables what is the best practice method to delete these entries for all users in uninstall.php? I could access the database directly but is there another way?
Matthew Hui's user avatar
6 votes
4 answers
4k views

How to delete custom taxonomy terms in plugin's uninstall.php?

I am writing my plugin's uninstall.php file and would like it to delete any terms that were created in the plugin's custom taxonomy. In the plugin's uninstall.php file I am using this: // Delete all ...
edeneye's user avatar
  • 415
4 votes
3 answers
351 views

Does plugin uninstall always put WordPress back into original state?

What is a plugin lifetime within a deployed instance of WordPress? Namely: do plugins modify existing files or do they only use defined extension points within WordPress? are plugins allowed to ...
Marek's user avatar
  • 635
4 votes
2 answers
13k views

How can I delete options with register_uninstall_hook?

Right now, I have this code: function mr_np_activate(){ // hook uninstall if ( function_exists('register_uninstall_hook') ) register_uninstall_hook(__FILE__,'mr_np_uninstall'); ...
homemrobo's user avatar
  • 143
2 votes
1 answer
2k views

Plugin uninstall: why run dbDelta after $wpdb->query($drop_sql)

i am reading professional wordpress. their code for uninstalling a plugin is //build our query to delete our custom table $sql = "DROP TABLE " . $table_name . ";"; //execute the query deleting the ...
Jiew Meng's user avatar
  • 1,911
1 vote
1 answer
7k views

How to check what plugins used to be on a WordPress installation?

It's easy to see what plugins are currently disabled through /wp-admin — but how could I see what plugins used to be on an installation of WordPress and were deleted?
Baumr's user avatar
  • 113
1 vote
1 answer
42 views

UnInstallation of a Plugin from a developers perspective - The correct and clean method

I think a good developer should provide the uninstallation in the safest and cleanest possible way. I downloaded various plugins today to understand the process, but everything was very confusing. I ...
Richa Sharma's user avatar
1 vote
1 answer
35 views

One of my plugins broke when I tried to update it, how do I safely uninstall it?

I recently tried to update Yoast SEO to its most recent release (4.3). My site is running the most recent version of WordPress (4.7.2). When I tried to install it, it gave me some error having to do ...
Mr. Chameleon's user avatar
1 vote
2 answers
331 views

Global variables during plugin activation , deactivation and uninstall operarations

For activation hooks codex states that you have to be explicit on globals: A note on variables during activation But that seems not to be working on uninstall.php If i define a global in my main ...
e4rthdog's user avatar
  • 471
1 vote
1 answer
2k views

uninstall.php file in Plugin to clean DB

I am aware that WordPress provides Plugins a nice way to clean up the db if the Plugin is deleted by providing the uninstall.php hook. You just have to place the cleaning code and it works. But my ...
Sudar's user avatar
  • 809
1 vote
0 answers
27 views

How to remove traces from widget during uninstallation

I have a small plugin, which registers a custom widget and now I am wondering how to remove all traces of this widget when the plugin is removed through the administration. If I look in the database ...
Cyclonecode's user avatar
  • 1,164
1 vote
3 answers
1k views

uninstall.php does not appear to trigger when uninstalling my plugin

i am new to plugin development in wordpress and i have have this simple test plugin that i am working on. The problem i am having is that the uninstall.php file does not appear to get trigger and as ...
Frederick M. Rogers's user avatar
1 vote
0 answers
20 views

Deleting custom post types , custom taxonomies and their data on unistalling [duplicate]

I want to delete my CPTs and taxonomies when someone uninstalls the plugin. Since the plugin is already deactivated the only way that i can do this is by issuing directly SQL statements to the db ...
e4rthdog's user avatar
  • 471
1 vote
0 answers
351 views

Custom message on plugin uninstall

I'm writing a small wordpress plugin that creates some custom files, but I'm wondering if there is a way to show a quick "reminder" pop-up or message when a user deactivates the plugin. I just want ...
David's user avatar
  • 113
1 vote
1 answer
229 views

Does plugin's uninstall.php file have access to the plugin 's object?

I read on the codex that the best way to implement a clean uninstallation functionality to a plugin is by adding a uninstall.php file inside your plugin directory. I'm wondering: can i use my plugin'...
pixeline's user avatar
  • 2,877
0 votes
2 answers
308 views

Remove .htaccess portion upon plugin deactivation?

I have a plugin that inserts some rewrite rule in the .htaccess file. However, upon deactivating it, doesn't remove said rule. The rule is nested in # BEGIN My plugin and # END My plugin. I want to ...
unfulvio's user avatar
  • 1,824
0 votes
1 answer
50 views

Plugin retrieving results even after uninstallation

I'm using the WP REST API plugin to get info from my website. I built a little plugin that uses this one. In my plugin I'm just removing some fields from the responses that I don't need. Everything ...
amp's user avatar
  • 103
0 votes
1 answer
142 views

Can my hooked uninstall class function access a global var declared in main plugin file?

My current setup is as follows... In the main plugin file, these two hooks are set (not inside any class): register_activation_hook(__FILE__, array('DG_Setup', 'activation')); ...
Dan's user avatar
  • 897
0 votes
1 answer
50 views

Can plugin2 uninstall plugin1 at the very beginning of plugin2's installation?

As per the title. I have a new version of a plugin. It installs fine on a clean WordPress. When a user tries to install it when they have a previous version installed, the plugin does not function. ...
josh's user avatar
  • 113
0 votes
2 answers
364 views

Is it possible to uninstall one plugin from within another plugin?

I'd like to be able to automatically uninstall certain plugins if they're detected (specifically Akismet and Hello Dolly), either by writing another plugin to do so or via my theme's functions.php ...
Travis Northcutt's user avatar
0 votes
1 answer
361 views

plugin uninstall function drop the tables, but shows errors on admin

I'm new in Wordpress and I have a function that drop the tables of my plugin on DB. <?php if (! defined('WP_UNINSTALL_PLUGIN')) { exit; } // Uninstallation actions here global $wpdb; $...
Felipe Gomes's user avatar
0 votes
3 answers
998 views

How Do I Uninstall a Current WordPress Theme and Install a Fresh Theme

I own a site called explainz.com. The current theme is all messed up. I am considering installing a new theme. How do I actually go about it? Would it be sufficient if I just uninstalled the existing ...
Dominic Francis's user avatar
0 votes
1 answer
245 views

Uninstalling IntenseDebate

I have been using the IntenseDebate Comments plugin, but am unhappy with it and would like to uninstall. Supposedly due to the data synchronization feature, it shouldn't be a problem to just disable ...
ewall's user avatar
  • 128
0 votes
2 answers
646 views

How to delete Crisp Chat plugin completely?

I had installed a chat plugin called Crisp chat. But i still see crisp chat box in my mobile but not in PC. I have deleted it yet it is seen in mobile. please guide me.
Nohan kumar's user avatar
0 votes
0 answers
38 views

Scripts don't enqueue after removing plugin

Using the Ultimate Member plugin. My custom scripts are loading in my child-theme as follows: function some_theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() ...
MAR's user avatar
  • 109
0 votes
1 answer
369 views

How to remove links generated by SEO-smart-links?

I tried seo-smart-links plugin and it linked all my posts to tags/categories and other posts. This looks stuffing and spamming to me so I uninstalled this plugin. Now the links are still there but the ...
Chankey Pathak's user avatar