WP Manifestindependent plugin directory
manifest / developer / dm-clone-taxonomy

DM Clone Taxonomy

A WordPress plugin which provides a WP CLI command to clone taxonomy data from one taxonomy to another - copies taxonomy terms, term meta and adds terms to posts of a specified type.

by Delicious Media Limited · github.com/deliciousmedia/dm-clone-taxonomy · website

2stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/deliciousmedia/dm-clone-taxonomy/archive/refs/heads/master.zip

Readme

DM Clone Taxonomy

A WordPress plugin which provides a WP CLI command to clone taxonomy data from one taxonomy to another - copies taxonomy terms, term meta and adds terms to posts of a specified type.

Originally written to enable the creation of a "duplicate" taxonomy to enable a client to re-categorise thousands of e-commerce products on a live site without disruption.

Usage

wp clonetax <source_taxonomy_name> <target_taxonomy_name> [--post_type=<post_type_name>] [--skip_meta_keys=<key1,key2>]

Notes

Need to empty out your target taxonomy when testing?

wp term delete target_taxonomy_name $(wp term list target_taxonomy_name --format=ids)

Supports the --debug switch to give more detailed information.

Todo

  • Add support for multiple post types.
  • Option to store/output $term_map data.
  • Should probably make this a WP CLI package.

Built by the team at Delicious Media, a specialist WordPress development agency based in Sheffield, UK.

Read the full README on GitHub →