WordPress.org

Ready to get started?Download WordPress

Forums

Changing ID numbers (11 posts)

  1. justrish
    Member
    Posted 7 years ago #

    I want to know if there is a way to change the ID number of a category. Because I deleted a few categories, it looks like the IDs are in a messed up order (1,2,9,12) etc.

    If anyone could tell me if there was a way to change this , then please let me know.
    Thanks.

  2. justrish
    Member
    Posted 7 years ago #

    I've figured it out now. :)

  3. MAK
    Member
    Posted 7 years ago #

    No, no no no no! rofl

    You need to tell us what you did to solve your thread issue! haha

    I have wanted to know this for the longest time myself. Please post your solution or answer here please.

    Thank you kindly.

    ~~ MAK

  4. justrish
    Member
    Posted 7 years ago #

    Ok, I'll explain this to you when I get back to my home laptop :)

  5. MAK
    Member
    Posted 7 years ago #

    Thanks justrish! I was hoping you'd come back haha.

  6. justrish
    Member
    Posted 7 years ago #

    :) I'm not an expert but I'll try.

    You have to access your MySQL Database Manager for this. When I accessed it I saw some categories on the left:

    # wp_categories
    # Browse wp_comments
    # Browse wp_linkcategories
    # Browse wp_links
    # Browse wp_options
    # Browse wp_post2cat
    # Browse wp_postmeta
    # Browse wp_posts
    # Browse wp_usermeta
    # Browse wp_users

    I clicked on the first one, then clicked the browse tab on the top. Then I manually edited each category id. But the thing is I had to edit all the posts to stick the tags back on.

    I hope someone can explain this better?

  7. Kafkaesqui

    Posted 7 years ago #

    "But the thing is I had to edit all the posts to stick the tags back on."

    That's because category IDs are not just put to use in your categories table (i.e. wp_categories), but also the post2cat table, which provides the *link* of post to category.

    We don't recommend changing IDs (for categories or posts) around here for just this sort of issue. At least, not unless you have a real good reason to do so, and know exactly what you're doing.

  8. thepete
    Member
    Posted 6 years ago #

    I'm not sure I understand what "edit all the posts to stick the tags back on" means.

    I'm curious why changing the category ID isn't easier to do considering how easy it is to mess up the numbering.

  9. MichaelH
    Member
    Posted 6 years ago #

    Now with the complexity of the terms tables (where categories are kept) it is not recommended to use any direct edit of the database tables.

    If a post needs a category assigned or deleted or a post needs a tag added or deleted, it is recommended to use the Manage Posts to do that.

  10. thepete
    Member
    Posted 6 years ago #

    But that doesn't address the problem of needing to be able to change the cat IDs. It seems like the more advanced in age WP gets the less versatile it's becoming.

    I'm really tired of wrestling with WP to get it to do what I want it to do. And just when I work it out, it's time to upgrade again.

  11. moshu
    Member
    Posted 6 years ago #

    needing to be able to change the cat IDs

    I can't really see a "need" for it ever. Nobody cares about your category numbering.
    Give me a real reason why it might be needed...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.