[英]Renumbering Categories in WordPress Blogs
我需要更改我的wordpress类别ID之一。
我找到了这个解决方案(该帖子来自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;
我可以使用这个查询吗?
您问题中的查询不再合适。 在WordPress的最新版本中没有这些表。
请尝试以下操作(确保首先拥有备份):
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;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.