[wp-hackers] Changing term IDs

Andrew Nacin wp at andrewnacin.com
Wed Feb 8 20:31:10 UTC 2012

On Tue, Feb 7, 2012 at 1:41 PM, William P. Davis <will.davis at gmail.com>wrote:

> We have a few different taxonomies that share terms — for example, Maine as
> a category and as a region. However, when we created the regions we didn't
> name a few of them exactly as they should have been, so the slugs got
> messed up (State of Maine as a category with the slug maine, Maine as a
> region, so the category slug is maine and the region slug is maine-2). I'd
> like to make the slugs line up, and I'm wondering if there would be any
> adverse effects if I simply went into _term_taxonomy and change the term ID
> of the region to the term ID of the category so the slugs line up.

There is no requirement for slugs to be unique across all term IDs. You can
term ID 1 for 'maine' and term ID 2 for 'maine', one being a category and
one being
a region. I would go into wp_terms and update the bad slug, rather than
them share term IDs. (In your case, sharing term IDs is going to be just
but in more general usage, shared term IDs can cause problems.)


More information about the wp-hackers mailing list