How do I move Drupal taxonomy terms from one vocabulary to another?
While you can use the excellent Taxonomy Manager module to move taxonomy terms between vocabularies, it's not always worth the trouble to install yet another module. For example, if you are doing this as a one-time merge of several vocabularies into a new vocabulary.
Here's the recipe:
- Identify the vocabulary ids (vid) for the source vocabularies. In our example, the source vocabulary ids are 6, 7, 8, and 9.
- Identify the vocabulary id for the target vocabulary. In our example, the target vocabulary id is 5.
- Execute the following SQL query:
UPDATE term_data SET vid = 5 WHERE vid IN(6,7,8,9)