Reputation: 11825
I need to change one of my wordpress categorie ID.
I found this solution (the post is from 2007 !)
https://avi.alkalay.net/2007/10/wordpress-renumber-category.html
UPDATE wp_categories SET cat_ID=1015 WHERE cat_ID=15 LIMIT 1;
UPDATE wp_post2cat SET category_id=1015 WHERE category_id=15;
UPDATE wp_link2cat SET category_id=1015 WHERE category_id=15;
Can i use this query?
Upvotes: 0
Views: 30
Reputation: 19308
The query in your question is no longer appropriate. None of those tables exist in recent versions of WordPress.
Try the following instead (MAKE SURE YOU HAVE A BACKUP FIRST):
UPDATE wp_terms SET term_id=1015 WHERE term_id=15;
UPDATE wp_term_taxonomy SET term_id=1015 WHERE term_id=15;
UPDATE wp_term_relationships SET object_id=1015 WHERE object_id=15;
Upvotes: 1