Can I retain custom taxonomy data when uninstalling a third-party plugin that created it?

admin2025-06-03  2

I installed and experimented with a third-party plugin. It created a custom hierarchical taxonomy, which I populated with a large number of terms.

The plugin did not match my needs, so I want to uninstall it. But I'd like to keep the custom taxonomy and its data to use with one of my own custom post types.

  1. Is there a way to determine if uninstalling the plugin will remove the taxonomy data?

  2. If I have registered that taxonomy for my custom post type, does that somehow "protect" the taxonomy from deletion?

  3. I can create and register my own clone of the plugin's taxonomy. Does that override the one defined by the plugin? Or does it depend on which one gets registered first?

  4. As a last resort, can I export the data in the custom taxonomy (the terms and their descriptions, for example), delete the plugin, and then, if necessary, import the data back into my cloned taxonomy?

I'd appreciate suggestions for how to proceed.

I installed and experimented with a third-party plugin. It created a custom hierarchical taxonomy, which I populated with a large number of terms.

The plugin did not match my needs, so I want to uninstall it. But I'd like to keep the custom taxonomy and its data to use with one of my own custom post types.

  1. Is there a way to determine if uninstalling the plugin will remove the taxonomy data?

  2. If I have registered that taxonomy for my custom post type, does that somehow "protect" the taxonomy from deletion?

  3. I can create and register my own clone of the plugin's taxonomy. Does that override the one defined by the plugin? Or does it depend on which one gets registered first?

  4. As a last resort, can I export the data in the custom taxonomy (the terms and their descriptions, for example), delete the plugin, and then, if necessary, import the data back into my cloned taxonomy?

I'd appreciate suggestions for how to proceed.

Share Improve this question asked Feb 13, 2019 at 17:37 user1198411user1198411 31 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

You could check the plugin files and see if the plugin author has registered an uninstall function with register_activation_hook or if there is a uninstall.php file in the plugin folder. I think the custom taxonomy and the terms should stay in your database, if the plugin doesn't do any uninstalling. You can then register the custom taxonomy with your own function, using the same name, object type and args.

I think WordPress will give you an error, if you try to register a custom taxonomy with the same name that an active plugin uses to register a taxonomy.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748911072a314743.html

最新回复(0)