Skip to content

generaxion/wp-cli-term-merge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

WP-CLI Term Merge

Contributors: Teemu Suoranta

Tags: WordPress, WP-CLI, Terms

License: GPLv2 or later

Description

Merge two terms into one. Move all posts from term A to term B and optionally delete term A after that.

How to use

Basic (all post types, image size large):

wp term-merge run --from={term_id 1} --to={term_id 2}

wp term-merge run --from=123 --to=321

Skip deleting the term:

wp term-merge run --from={term_id 1} --to={term_id 2} --skip-delete

Output

$ wp term-merge run --from=123 --to=321
Success: Done: 10 posts moved from #123 (Books) to #321 (Literary)
Success: Deleted term #123 (Books)

Disclaimer

You should backup your database before running this just in case.

About

Merge two terms into one via WP-CLI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages