Title: Eliminating shared taxonomy terms in WordPress 4.3
Author: Boone Gorges
Published: June 9, 2015
Last modified: August 18, 2015

---

 [  ](https://profiles.wordpress.org/boonebgorges/) [Boone Gorges](https://profiles.wordpress.org/boonebgorges/)
7:52 pm _on_ June 9, 2015     
Tags: [4.3 ( 65 )](https://make.wordpress.org/core/tag/4-3/),
[dev-notes ( 647 )](https://make.wordpress.org/core/tag/dev-notes/), [taxonomy ( 16 )](https://make.wordpress.org/core/tag/taxonomy/)

# Eliminating shared taxonomy terms in WordPress 4.3

Work on the [taxonomy roadmap](https://make.wordpress.org/core/2013/07/28/potential-roadmap-for-taxonomy-meta-and-post-relationships/),
started in earnest during the 4.1 dev cycle, continues to chug along for WordPress
4.3. We’ve been focusing on the elimination of _shared terms_: terms in different
taxonomies that share the same `term_id` and thus the same row in the `wp_terms`
database table. In 4.1, we [stopped creating shared terms](https://core.trac.wordpress.org/ticket/21950).
In 4.2, we began [splitting existing taxonomy terms](https://core.trac.wordpress.org/ticket/5809)
when those terms were updated.

In 4.3, we’ll take the final step. **When a WordPress site upgrades to 4.3, all 
existing shared terms will be split**.

Toward that end, I’d like to make (a) a final warning to pluginPlugin A plugin is
a piece of software containing a group of functions that can be added to a WordPress
website. They can extend functionality or add new features to your WordPress websites.
WordPress plugins are written in the PHP programming language and integrate seamlessly
with WordPress. These can be free in the WordPress.org Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
or can be cost-based plugin from a third-party. authors, and (b) a plea for help
from taxonomyTaxonomy A taxonomy is a way to group things together. In WordPress,
some common taxonomies are category, link, tag, or post format. [https://codex.wordpress.org/Taxonomies#Default_Taxonomies](https://codex.wordpress.org/Taxonomies#Default_Taxonomies).
mavens and those who maintain very large and complex WordPress installations.

### Plugin authors: Dress rehearsal is nearly over

Since 4.2, saving a shared term (via any interface that uses `wp_update_term()`)
causes that term to be split. It’s fairly rare to update a taxonomy term, which 
has made 4.2 a sort of trial run for authors to [ensure that their plugins are ready for the transition](https://make.wordpress.org/core/2015/02/16/taxonomy-term-splitting-in-4-2-a-developer-guide/).
A quick scan of the plugin repo shows that a few dozen authors have taken advantage
of this opportunity. I dub these developers Heroes of WordPress and grant them 🌟
🌟 many gold stars 🌟🌟. Many authors, however, have neglected to make the necessary
updates.

All WP developers should take note that **the upgrade to 4.3 is likely to surface
many more odd bugs related to shared terms than 4.2 did**. Plugin authors are strongly
encouraged to review [the 4.2 term splitting field guide](https://make.wordpress.org/core/2015/02/16/taxonomy-term-splitting-in-4-2-a-developer-guide/)
to understand the potential repercussions for their public plugins as well as their
custom client work, and to review techniques for ensuring a smooth transition.

### Get involved

The 4.3 ticketticket Created for both bug reports and feature development on the
bug tracker. for splitting taxonomy terms on WP upgrade, [#30261](https://core.trac.wordpress.org/ticket/30261),
is sorely in need of developer feedback. The process of splitting shared terms en
masse is potentially resource-intensive, especially on sites with very large numbers
of terms (and especially with very large numbers of shared terms). The latest patchpatch
A special text file that describes changes to code, by identifying the files and
lines which are added, removed, and altered. It may also be referred to as a **diff**.
A patch can be _applied_ to a codebase for testing. on the ticket has some optimizations
so that sites with many hundreds of shared terms can be migrated in just a few seconds.
If you maintain a site with a large number of (shared) taxonomy terms, or if you
maintain a WordPress networknetwork (versus site, blog) with a very large number
of sites (especially if you have a custom routine for rolling out database updates),
your review and testing of the upgrade routine would be much appreciated.

### Booyah

The fun stuff on the taxonomy roadmap – like termmeta – depends on the complete 
elimination of shared terms. Let’s get the hard stuff done in 4.3, so that we can
make all of your taxonomy dreams come true in the next couple releases.

[#4-3](https://make.wordpress.org/core/tag/4-3/), [#dev-notes](https://make.wordpress.org/core/tag/dev-notes/),
[#taxonomy](https://make.wordpress.org/core/tag/taxonomy/)

### Share this:

 * [  Threads ](https://make.wordpress.org/core/2015/06/09/eliminating-shared-taxonomy-terms-in-wordpress-4-3/?share=threads)
 * [  Mastodon ](https://make.wordpress.org/core/2015/06/09/eliminating-shared-taxonomy-terms-in-wordpress-4-3/?share=mastodon)
 * [  Bluesky ](https://make.wordpress.org/core/2015/06/09/eliminating-shared-taxonomy-terms-in-wordpress-4-3/?share=bluesky)
 * [  X ](https://make.wordpress.org/core/2015/06/09/eliminating-shared-taxonomy-terms-in-wordpress-4-3/?share=x)
 * [  Facebook ](https://make.wordpress.org/core/2015/06/09/eliminating-shared-taxonomy-terms-in-wordpress-4-3/?share=facebook)
 * [  LinkedIn ](https://make.wordpress.org/core/2015/06/09/eliminating-shared-taxonomy-terms-in-wordpress-4-3/?share=linkedin)

 1.  ![](https://secure.gravatar.com/avatar/6209d9a2ce86569180127c72f958394436a74edc39883015552c80533b726011?
     s=32&d=mm&r=g)
 2.   [brianvan](https://profiles.wordpress.org/brianvan/)  8:31 pm _on_ June 9, 2015
 3.  Great work here. Sounds like the team has been thorough in addressing any major
     issues that come out of this. Looking forward to the future stuff on the taxonomyTaxonomy
     A taxonomy is a way to group things together. In WordPress, some common taxonomies
     are category, link, tag, or post format. [https://codex.wordpress.org/Taxonomies#Default_Taxonomies](https://codex.wordpress.org/Taxonomies#Default_Taxonomies).
     roadmap!
 4.  ![](https://secure.gravatar.com/avatar/7d4e6978df89809d15df65aac619677de2180d4e0ec5a613aece7c9e7103324d?
     s=32&d=mm&r=g)
 5.   [J.D. Grimes](https://profiles.wordpress.org/jdgrimes/)  7:12 pm _on_ July 3,
     2015
 6.  [@boonebgorges](https://profiles.wordpress.org/boonebgorges/), is there a plan
     for, e.g., [#20536](https://core.trac.wordpress.org/ticket/20536)?
 7.   * ![](https://secure.gravatar.com/avatar/5cc12be051fe02dec266f899b7613325ff3b12b6f6e4f1a85850ed677216cf17?
        s=32&d=mm&r=g)
      *  [Boone Gorges](https://profiles.wordpress.org/boonebgorges/)  6:07 pm _on_
        July 4, 2015
      * I don’t think a plan has been spelled out in detail. But yes: in the medium
        term, say two or three major releases from now, I’d like to start simplifying
        the taxonomyTaxonomy A taxonomy is a way to group things together. In WordPress,
        some common taxonomies are category, link, tag, or post format. [https://codex.wordpress.org/Taxonomies#Default_Taxonomies](https://codex.wordpress.org/Taxonomies#Default_Taxonomies).
        internals by doing things like [#20536](https://core.trac.wordpress.org/ticket/20536).
        At the beginning of 4.4, maybe we can start brainstorming about what can be
        done.
 8.  ![](https://secure.gravatar.com/avatar/fdccf53b382921565648eb2ac9994cec22627c19dc385ac93ad5bd8a5e2fbb04?
     s=32&d=mm&r=g)
 9.   [Mayeenul Islam](https://profiles.wordpress.org/wzislam/)  10:03 am _on_ August
     19, 2015
 10. Just to understand the insight, pardon me, does that mean that, every `term_id`
     will be unique, regardless of taxonomyTaxonomy A taxonomy is a way to group things
     together. In WordPress, some common taxonomies are category, link, tag, or post
     format. [https://codex.wordpress.org/Taxonomies#Default_Taxonomies](https://codex.wordpress.org/Taxonomies#Default_Taxonomies).?
 11.  * ![](https://secure.gravatar.com/avatar/bf597a1d17ae94b7eac03aa225520bdb84ab1db66a606c9ae7a1116c553d540f?
        s=32&d=mm&r=g)
      *  [ancawonka](https://profiles.wordpress.org/ancawonka/)  6:00 pm _on_ August
        19, 2015
      * That seems to be the case. This has a lot of implications for sites using themes
        or plugins that ask for a term_id (for widgets, shortcodes, theme options, 
        etc). Make sure you check pages where this is relevant.
 12. ![](https://secure.gravatar.com/avatar/d087cd85b6d54e3e21c1309eea75152cb8552a6594e403592b64af9b96afdade?
     s=32&d=mm&r=g)
 13.  [mwendell](https://profiles.wordpress.org/mwendell/)  5:57 am _on_ September 
     2, 2015
 14. If every term is unique within each taxonomyTaxonomy A taxonomy is a way to group
     things together. In WordPress, some common taxonomies are category, link, tag,
     or post format. [https://codex.wordpress.org/Taxonomies#Default_Taxonomies](https://codex.wordpress.org/Taxonomies#Default_Taxonomies).,
     why are we still using a terms table AND a terms_taxonomy table? I thought the
     point of the latter was to enable a single term to exist across multiple taxonomies.
 15.  * ![](https://secure.gravatar.com/avatar/5cc12be051fe02dec266f899b7613325ff3b12b6f6e4f1a85850ed677216cf17?
        s=32&d=mm&r=g)
      *  [Boone Gorges](https://profiles.wordpress.org/boonebgorges/)  1:30 pm _on_
        September 2, 2015
      * > I thought the point of the latter was to enable a single term to exist across
        multiple taxonomies.
      * You’re correct. But we can’t just remove one of the tables. (a) The tables 
        have different columns, so they have to be combined somehow. (b) People making
        reference to the tables in their own SQL – either via `$wpdb->term_taxonomy`
        or using the table name directly – will have their queries broken if a table
        is just ripped out. (c) Tables can’t be combined until terms have been made
        unique across all installations, or data will be lost; we need to allow some
        time for this to happen after the release of 4.3, since database upgrade routines
        are not always run immediately.
      * If you want to follow along with the next steps in the process, check out [https://make.wordpress.org/core/2015/08/27/taxonomy-roadmap-for-4-4-and-beyond/](https://make.wordpress.org/core/2015/08/27/taxonomy-roadmap-for-4-4-and-beyond/)
        and especially [https://core.trac.wordpress.org/ticket/30262](https://core.trac.wordpress.org/ticket/30262)

Comments are closed.

# Post navigation

[← Trust, Live Preview, and Menus in the Customizer](https://make.wordpress.org/core/2015/06/09/trust-live-preview-and-menus-in-the-customizer/)

[Multisite Office Hours Recap (June 9, 2015) →](https://make.wordpress.org/core/2015/06/09/multisite-office-hours-recap-june-9-2015/)