Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [uninstallation]

The tag has no usage guidance.

0
votes
0answers
23 views

How to give user the choice to delete all data when uninstalling plugin

I'm about to finish my first plugin which give the users the possibility to mark their posts on an interactive map (great for travelers' blogs). The plugin uses : Post Metadata to store the latitude ...
1
vote
1answer
31 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 ...
1
vote
0answers
17 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 ...
0
votes
0answers
57 views

Remove related WP-JSON custom endpoints on plugin uninstall

I am working on removing all the relevant data from my plugin within uninstall.php. I have been searching through the Codex and through numerous answers here and on Stack Overflow and I am either ...
0
votes
0answers
50 views

check_admin_referer fails on new AJAX plugin uninstall with “Are you sure you want to do this?”

Before WordPress core had AJAX plugin actions, uninstallation in register_uninstall_hook() worked fine: if ( ! current_user_can( 'activate_plugins' ) ) return; check_admin_referer( 'bulk-plugins' ...
0
votes
1answer
124 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; $...
1
vote
2answers
230 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 ...
0
votes
3answers
626 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 ...
1
vote
1answer
13 views

Where could I see uninstallation directives for a plugin?

Where could I see uninstallation directives for a plugin? I have a plugin named "Wordfence" I want to remove. I need to remove it manually due to what might be a bug in the plugin. How Could I see ...
1
vote
1answer
30 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 ...
0
votes
1answer
41 views

uninstall a theme programmaticlly

I'm working on a plugin that create, install, switch between child themes. But I have a problem that my plugin creates just 2 or 3 child themes ( Is there any limit in creating child themes?). So I'...
0
votes
1answer
34 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 ...
1
vote
2answers
61 views

Delete and perform a fresh install of WordPress

I have a blog page on my site, and after several people tried to help fix a problem it has gotten to the point that I get a lot of errors. I am looking to delete my blog I reinstall it again, ...
7
votes
2answers
1k views

register_uninstall_hook() vs uninstall.php - which one is better way to handle plugin uninstallation script?

today while looking inside WP Codex, I saw two ways to handle plugin uninstall scripts (like deletings, options, data, tables etc.). One way is using register_uninstall_hook() and the other is by ...
1
vote
0answers
15 views

Uninstallation method not triggered in child theme [duplicate]

I'm currently working on a WordPress child theme and I needed a way to delete all the data on uninstall, so I found this in the WordPress documentation. I tested uninstall.php or the ...
1
vote
3answers
65 views

Plugin development: delete options when updating to a new version

As a plugin developer, I want to ensure that my plugin doesn't leave any custom settings left behind from my plugin when upgrading from v1.0 to v2.0. Whenever a user uninstalls my plugin, I've ...
4
votes
2answers
1k views

Uninstalling a plugin: delete all options with specific prefix

Objective As all plugin developer, I want to delete all options that begin with the same prefix. Backstory I've developed a plugin that stores data in the options. When the user uninstalls the ...
1
vote
2answers
82 views

Clearing caches on plugin uninstall

When a plugin is uninstalled, it should remove all related data from the site (or network, if on multisite). If a plugin adds tables to the database, for example, it should remove those tables from ...
2
votes
1answer
278 views

Delete options from all blogs on plugin uninstall from a network/multisite

Codex says about deleting options on uninstal //note in multisite looping through blogs to delete options on each blog does not scale. You'll just have to leave them. I am not very hopeful, but ...
1
vote
2answers
196 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 ...
1
vote
0answers
17 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 ...
0
votes
1answer
63 views

PHP script for wiping WP database and folder

I have been trying to figure this out for the past couple of hours, mostly by using some code snippets found online, but since my PHP skills are quite rusty I haven't been able to put it together. If ...
1
vote
1answer
573 views

Deletion of shared options using uninstall.php

I'm using uninstall.php for my plugin to delete all the traces my plugin did to a site on uninstall (delete). I did it in a good way, but even after the deletion there are some fields in the options ...
3
votes
1answer
10k views

wpdb::prepare was called incorrectly

I have this code to remove orphaned posts after deleting custom post type. It works, but this code... global $wpdb; $wpdb->query( $wpdb->prepare( "DELETE a,b,c FROM wp_posts a ...
0
votes
1answer
74 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')); ...
1
vote
0answers
157 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 ...
4
votes
5answers
4k views

Remove settings if theme is deleted?

Is it possible to perform an action only if the theme is deleted (not deactivated) from the theme directory ? For example, I want to remove the theme settings from database after the theme is removed....
4
votes
3answers
2k 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 ...
1
vote
1answer
5k 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?
1
vote
1answer
465 views

How does uninstalling WordPress plugins work?

I'm trying to drop a database table when the user uninstalls the plugin. But what does uninstalling a WordPress plugin really mean? There's the deactivation hook and there's also the uninstall hook. ...
1
vote
1answer
321 views

Query users by capability - uninstall/deactivate callback

The situation Running on MU, I'm writing an open source/publically and freely available plugin. As I used add_screen_option() to allow users to easily setup the admin page to their likings, I'm left ...
1
vote
1answer
1k 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 ...
-7
votes
1answer
63 views

I am trying to install a site that a larger organization sent me, where do I start? [closed]

I have the zip file with everything in it, but there's just not a simple way to "run"? What all do I need? Do I need my own server or should they have their own?
0
votes
2answers
113 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 ...
0
votes
1answer
326 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 ...
1
vote
1answer
468 views

How to remove plugin-specific custom taxonomy terms when plugin is uninstalled?

I'm trying to write a class that would allow for easy removal of all plugin-related data when the plugin is uninstalled. Specifically, I want it to remove plugin options, custom post type entries, and ...
4
votes
2answers
1k views

Popup asking whether data should be removed on plugin uninstall

I have a plugin which creates some options in wp_options, but also creates custom post types and is used to populate that post type. Upon install it makes sense to remove the data in wp_options, but ...
2
votes
2answers
3k views

Plugin could not be deleted due to an error: Could not fully remove the plugin(s) my-plugin/my-plugin.php

Why uninstalling the following (empty) plugin results in error? Here is my-plugin/my-plugin.php: <?php /* Plugin Name: My Plugin */ and my-plugin/uninstall.php: <?php When I click 'Delete' ...
4
votes
4answers
3k 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?
1
vote
1answer
212 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'...
0
votes
1answer
40 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. ...
1
vote
1answer
2k views

Deleting Custom Posts & Meta Data on Uninstall

My uninstall.php file won't delete my custom posts and the meta data related to them on uninstall. The plugin files get deleted, but nothing from the database. If anyone is able to have a look at ...
2
votes
1answer
242 views

Downgrading a WP3.3.1 Network Install

Good Morning-- Today I need to downgrade a site from a WP network install to a normal WP install. I thought this would be simple -- just removing these lines from wp-config.php: define( '...
3
votes
2answers
1k views

Is it appropriate to remove custom posts and terms on plugin uninstall?

This is more of a "best practices" than a question, but I was wondering, what to people typically remove when their plugin is removed? I have a plugin that does the following: registers custom post ...
2
votes
1answer
868 views

Plugin Uninstall and Deactivate via Options Menu

I'm creating my first plugin (modifying an existing one for what I need) and although it's working fine i am trying to create a simple options menu to allow either deactivation of the plugin, or ...
98
votes
2answers
51k 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 ...
2
votes
2answers
7k 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'); ...
0
votes
1answer
241 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 ...
2
votes
2answers
164 views

Example of uninstaller routine to remove all custom theme options from wp_options

All of my theme's custom options are preceeded with "mytheme_" + option. For example, mytheme_color1, mytheme_color2, mytheme_body_font_color, etc... I'd like to create a plugin that uninstalls all ...
0
votes
2answers
217 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 ...