How to move WordPress categories, tags, and term relationships in an auto blog migration: Move the categories, tags, custom taxonomies, and term…
Last updated: November 29, 2026
Move the categories, tags, custom taxonomies, and term relationships by matching terms first, then importing posts against those matches. If term IDs change and you do not remap them, WordPress can still import the posts, but the archive links, parent-child structure, and post-to-term connections will drift. This guide sits under the WordPress auto blog migration technical transfer hub.
Key takeaways
- Categories and tags are only part of the job; the real risk is broken term relationships.
- Term IDs are local to a site, so they cannot be trusted across two WordPress installs.
- Slugs, names, and parent settings matter more than the old numeric ID.
- Custom taxonomies need the same treatment as categories and tags if posts depend on them.
- A clean migration keeps archive pages, not just post content, pointed at the right terms.
What actually has to move?
You need to move the term data, the term-to-post links, and the archive structure, not just the visible category names. In WordPress, categories, tags, and custom taxonomies are separate taxonomies, but they all depend on terms, slugs, and relationships.
A beginner mistake is to think the post export file handles everything by itself. WordPress export and import tools do move a lot, but the relationship layer can still break when the old site and the new site do not share the same term IDs or the same taxonomy setup. The WordPress export tool and import screen are documented by WordPress itself, and the taxonomy model is described in the developer docs for custom taxonomies and taxonomy templates.
- WordPress export: https://wordpress.org/documentation/article/tools-export-screen/
- WordPress import: https://wordpress.org/documentation/article/tools-import-screen/
- Taxonomies: https://developer.wordpress.org/plugins/metadata/custom-taxonomies/
The main pieces to check are simple:
- Categories for hierarchical structure.
- Tags for flat term groups.
- Custom taxonomies if the auto blog uses anything beyond the default pair.
- Term relationships so each post lands in the same archive on the new site.
- Category slugs and parent-child terms so URLs and hierarchy stay consistent.
If the migration keeps posts but loses those links, the site can still “work” while every archive page becomes messy. That is why taxonomy transfer belongs in the migration plan, not after the import is finished.
How do term IDs affect the migration?
Term IDs matter because WordPress stores relationships using numeric IDs, but those IDs are local to each site. The same category name can have a different ID on the destination site, so copying IDs straight across is not a safe move.
The practical rule is this: use slugs and names to match terms, then let the destination site assign its own IDs. A slug is the cleaner anchor than a label because names can vary in punctuation, case, or spacing. If two sites both have a category called “Tech News,” the slug and parent relationship tell WordPress which term to attach, not the old ID alone.
Here is the part many generic guides skip: parent-child categories can share names in different branches, so the parent path matters too. A top-level “News” category and a subcategory “News” under another branch are not the same thing. If you map only by name, you can flatten the tree without noticing until the archive URLs look wrong.
A simple comparison helps:
| Item | Safe to match by | Risk if you ignore it |
|---|---|---|
| Category | slug, then name, then parent | wrong archive pages or duplicate terms |
| Tag | slug or name | duplicate tags or missing post links |
| Custom taxonomy term | taxonomy name + slug | posts attached to the wrong content bucket |
| Term ID | not safe across sites | broken relationships after import |

This is why the migration step should be “recreate the terms first, then attach posts.” If you do it in the reverse order, WordPress may create duplicate terms or connect posts to fallback entries you did not intend.
What is the right order for moving categories and tags?
The right order is to build the destination taxonomy map first, import or create the terms, then import the posts that point to those terms. That order keeps term relationships intact instead of forcing WordPress to guess later.

Use this procedure as the core migration path:
- List every taxonomy in use. Write down categories, tags, and any custom taxonomies used by the auto blog, including hierarchical ones with parent-child branches. This gives you one source list before any import begins.
- Export the content and term data from the source site. Use the standard WordPress export tool so you have the post records and taxonomy references in one place. The export file should preserve the labels and relationships needed for the new site.
- Create the same taxonomies on the destination site. Make sure the destination theme or plugins register the same custom taxonomies before import. If the taxonomy does not exist yet, the post import has nowhere stable to attach the term.
- Match existing terms by slug, not only by name. Recreate categories and tags with the same slugs where possible. If a slug must change, record the mapping so the old term can be attached to the new one by hand or by import logic.
- Preserve parent-child term structure. Rebuild parent categories before their children so the hierarchy is available when posts arrive. That protects the archive tree and the navigation built from it.
- Import the posts after the terms exist. When the posts come in, WordPress can attach each record to the correct terms instead of creating stray duplicates. The result should be the same post-to-term relationships, only on the new site.
- Check archive pages and missing counts. Visit a sample of category, tag, and custom taxonomy archives. Look for empty archives where content should exist, or for duplicate archives that point to the same posts.
That order is slower than copying content first, but it is the safer path for an auto blog migration. It is also the better choice when the site depends on archive pages for internal browsing, not just on single posts.
How do you keep parent categories intact?
You keep parent categories intact by recreating the full hierarchy before you attach any posts. WordPress stores category structure as a parent-child chain, so a child category imported without its parent can land in the wrong place or become a flat term.
The cleanest way to think about this is in three layers: parent term, child term, and post relationship. If the parent term changes name, slug, or status on the destination site, the child may still import, but the archive path can change with it. That is a real cost, because a broken hierarchy makes category landing pages harder to trust and harder to browse.
Two details matter most:
- Parent order: create the parent term first, then the child term.
- Slug consistency: keep the slug stable if the archive URL matters.
If a parent category must change, do it before the migration, not after. Changing it later can force redirects, confuse archive links, and split traffic between the old path and the new one. That is one reason taxonomy work should happen while the destination site is still in staging.
If the blog uses custom taxonomies with children, treat them the same way. Hierarchy is not a category-only issue; it applies to any taxonomy that relies on a parent setting. The fix is always the same: build the tree first, then attach content.
What breaks when slugs or term IDs change?
The main breakage is archive mismatch, but missing relationships and duplicate terms are the first signs. If a slug changes, the archive URL changes. If a term ID changes without a matching remap, posts can point to the wrong term or lose the connection altogether.

This is where generic migration advice often fails. It says “import everything” without checking whether the destination site now has two versions of the same tag, or whether the old category slug was reused for a different term. WordPress will not always stop you from creating that mess.
A few practical costs show up fast:
- Search and internal links: links to category archives can point to the wrong page.
- Duplicate content signals: if old and new archive paths both stay live, the same post group can appear in two places.
- Broken navigation: menus, widgets, and breadcrumbs may still point at the old term path.
- Lost grouping: posts that depended on a tag or custom taxonomy can become harder to find.
This is also why a direct “term ID copy” is usually the wrong move for an auto blog migration. IDs are database keys, not business logic. The business logic is the term name, slug, and parent chain.
Should tags be merged before or after migration?
Tags should usually be merged before the final import, because post-to-tag relationships are easier to preserve when the destination site already has the right tag set. If two tags mean the same thing, leaving both in place during import can split posts across duplicate archives.
For example, if the source site uses both “SEO Tips” and “Search Engine Tips” for the same topic, decide on one destination tag before the posts move. That gives you one archive page, one post pool, and one place to update the menu or internal links later. If you wait until after migration, you may need to merge thousands of post relationships by hand.
The trade-off is simple: merging early reduces duplication, but it also removes any chance to compare old tag usage side by side on the destination site. If you need that comparison for audit work, keep the original terms during staging and merge only after you review the mapping.
Tags are flatter than categories, so they are usually less dangerous to move. Even so, they still need a clear rule. Either the tag is preserved with its slug, or it is intentionally merged into a destination tag. Halfway decisions create duplicate archives and messy tag clouds.
Common mistakes that cost the most
The most expensive mistake is importing posts before the destination taxonomy exists. That creates patch-up work, because WordPress may invent new terms or attach posts to fallback matches you did not plan for.
Another common mistake is changing slugs after the import and forgetting that archive links depend on them. A category page can look fine in the dashboard while the public URL has already moved. That breaks archive integrity, which is the whole point of this migration.
A third mistake is assuming tags and categories behave the same way. They do not. Categories are usually hierarchical, tags are not, and custom taxonomies can follow either pattern depending on how the site was built. If you treat them all like flat labels, parent-child terms are the first thing to break.
Finally, do not ignore term relationships when the migration is “just an auto blog.” Automated content often creates a lot of archive pages quickly, which means a small taxonomy error can spread across many posts at once. A clean import saves hours later; a sloppy one creates duplicates that are harder to untangle than the original migration.
This page belongs with the broader WordPress auto blog migration technical transfer work, but the rule here stays narrow: move the taxonomy structure first, then the content that depends on it.
What breaks when taxonomy term IDs change?
Taxonomy term IDs stop matching the old site, so posts can lose their intended category, tag, or custom taxonomy assignment. The content may still import, but the archive structure can split, duplicate, or point at the wrong term. The safer fix is to map by slug and parent relationship, not by old database ID.
How do you keep parent categories intact?
Keep parent categories intact by recreating the parent terms before the children and keeping the same slug structure where possible. WordPress uses the parent-child chain to build hierarchy, so a child without its parent can land in the wrong place. If the hierarchy matters to navigation, rebuild it before the post import.
Should tags be merged before or after migration?
Tags are usually better merged before the final import, because that keeps post relationships attached to one destination tag instead of splitting across duplicates. If you need to audit old tag usage first, keep them separate in staging and merge only after review. The key is to decide once, not halfway through the transfer.
Drafted with AI; not yet reviewed by a person.