Title: Changing ID numbers
Last modified: August 18, 2016

---

# Changing ID numbers

 *  [justrish](https://wordpress.org/support/users/justrish/)
 * (@justrish)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/changing-id-numbers/)
 * 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.

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Thread Starter [justrish](https://wordpress.org/support/users/justrish/)
 * (@justrish)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/changing-id-numbers/#post-493602)
 * I’ve figured it out now. 🙂
 *  [Mark Kehn](https://wordpress.org/support/users/mak/)
 * (@mak)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/changing-id-numbers/#post-493603)
 * 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
 *  Thread Starter [justrish](https://wordpress.org/support/users/justrish/)
 * (@justrish)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/changing-id-numbers/#post-493610)
 * Ok, I’ll explain this to you when I get back to my home laptop 🙂
 *  [Mark Kehn](https://wordpress.org/support/users/mak/)
 * (@mak)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/changing-id-numbers/#post-493611)
 * Thanks justrish! I was hoping you’d come back haha.
 *  Thread Starter [justrish](https://wordpress.org/support/users/justrish/)
 * (@justrish)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/changing-id-numbers/#post-493629)
 * 🙂 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?
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/changing-id-numbers/#post-493630)
 * “_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.
 *  [thepete](https://wordpress.org/support/users/thepete/)
 * (@thepete)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/changing-id-numbers/#post-494067)
 * 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.
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/changing-id-numbers/#post-494068)
 * 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.
 *  [thepete](https://wordpress.org/support/users/thepete/)
 * (@thepete)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/changing-id-numbers/#post-494069)
 * 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.
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/changing-id-numbers/#post-494070)
 * _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…

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Changing ID numbers’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 6 participants
 * Last reply from: [moshu](https://wordpress.org/support/users/moshu/)
 * Last activity: [18 years, 5 months ago](https://wordpress.org/support/topic/changing-id-numbers/#post-494070)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
