• So i recently imported content from a tumblr blog to wordpress using this tool: https://benapps.net/. However there seems to be a problem with duplicate tags. For example:
    I have 39 posts tagged “beagle” with a slug of “beagle”.
    I have 120 posts tagged “beagles” with a slug of “beagles-1” or “beagles-2” Everything tagged as “beagles” registers as its own tag. This is a huge problem for me. Is this some sort of wordpress import problem?
    I cant even change the slugs manually, i just get an “Item not updated.” error. Is there any way i can group these tags? has anyone experienced something similar?

    please help.

Viewing 1 replies (of 1 total)
  • IT IS EASY TO MESS THIS UP! Backup your database first!!

    You can reassign the posts from beagles-1 and beagles-2 to beagles with some SQL queries. Assume that the term_taxonomy_id for beagles is 40, beagles-1 is 4, and your database prefix is wp_. Use this query to reassign the posts to 40:

    UPDATE IGNORE wp_term_relationships
    SET term_taxonomy_id = 40
    WHERE term_taxonomy_id = 4

    Note that this will not update any posts that are in both beagles and beagles-1. Repeat the query using the term_taxonomy_id for beagles-2 instead of 4.

    Now, update the post counts for beagles with this:

    UPDATE wp_term_taxonomy
    SET count =
    (SELECT count(p.ID)
    FROM wp_posts p, wp_term_relationships tr
    WHERE p.ID = tr.object_id
    AND tr.term_taxonomy_id = 40
    AND p.post_type = 'post'
    AND p.post_status = 'publish')
    WHERE term_taxonomy_id = 40
Viewing 1 replies (of 1 total)
  • The topic ‘Duplicate Tags’ is closed to new replies.