WordPress.org

Ready to get started?Download WordPress

Forums

Recaculate tags (6 posts)

  1. enderandrew
    Member
    Posted 1 year ago #

    I'm taking over a website/blog that someone else was shutting down. Some of the writers are moving over, and some are not. I deleted all the WordPress posts from the writers who did not move over, but now I have a bunch of tags (showing a tag count) for posts that no longer exist.

    Is there a way to have WordPress recalculate how many times a tag is actually used in the posts so I can removed the unused ones?

  2. deepbevel
    Member
    Posted 1 year ago #

    under posts/tags, you'll see a list of all your tags and how many posts are using them. You can delete them if you want.

    otherwise I used to use this, but it's old so I can't reccomend it. Can't seem to find anything like it that's current.

  3. enderandrew
    Member
    Posted 1 year ago #

    The problem is that the count is off. So my tag cloud links to tags that it thinks are in use, when they are not.

    There are some plugins that delete tags that have a count of zero, but I need to recalculate the count.

  4. deepbevel
    Member
    Posted 1 year ago #

    much deeper than I thought. I've never encountered that simply by deleting posts with tags. Good luck!

  5. enderandrew
    Member
    Posted 1 year ago #

    I'm assuming what I really need is something that sets the count of all my tags to 0. That's simple enough to do in SQL.

    The next step is tricky. Look through each post and check for tags, and then increment the count accordingly.

  6. enderandrew
    Member
    Posted 1 year ago #

    I think I answered my own question in a sense. I can't think of a good way to automate the second step. However, I just made a backup from SQL and then:

    update wp_term_taxonomy set count = 0

    Now I'm just "updating" each post real quick, which is saving tag data and updating the count for the tags in that post at least. When I'm done, just delete any row where the count = 0.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.