Problems with categories, wp_term_taxonomy and wp_terms – new upgrade
Recently I upgraded from 2.0.2 to 2.6. The problem is that the categories were missing from the posts. I checked phpMyAdmin/the database and found that -2-2-2-2-2-2-2-2-2 appeared throughout wp_terms table.
I’ve gone in and tried cowboyuk80’s advice by emptying wp_terms and pasting sql script (which you can find here: http://wordpress.org/support/topic/188927?replies=18), but it didn’t seem to work (only Blogroll, Uncategorized showed up in wp_terms) …so I emptied the table and proceeded to match the old Category information, and added to wp_term_taxonomy – (following the advice found here: http://blog.cumps.be/wordpress-26-upgrade-fix-missing-categories/) – I manually edited a few records and filled in all of the descriptions, then went into wp_terms, inserted new rows and matched up the information now in wp_term_taxonomy. This worked and the categories started to show up again on the blog posts.
I have hundreds of categories, adding them manually will take hours. Also, in the meantime, I foolishly started adding posts in WordPress, with new tags and categories, and found that the tags were showing up in wp-admin/Categories and in wp_term_taxonomy. That was a mistake – when I checked I saw that the tags were overriding the old category id numbers in wp_term_taxonomy, so I’ve now stopped adding them — and they were added in wp_terms, showing up in random/high numbered ids. (I really hope I’m being clear with my description). I’ve also noticed that the wp_term_taxonomy and wp_terms term_ids are now out of sequence starting at 59 and I’m not sure what to do at this point. I think this will lead to problems if the term ids between the two tables don’t match.
I’m aware that the two tables are working with wp_term_relationships, so am concerned what will happen if I empty the two tables (terms and taxonomy) and start again.
If I pick 20 categories in wp_term_taxonomy and the 20 matched ids in wp_terms, to keep, and then delete all the other categories/terms in both tables, what will happen in wp_term_relationships? Can I do that? (I don’t mind deleting the bulk of categories if I can keep a few.)
Or are there other alternatives?
I’ve made a mess here, I regret it, and would really appreciate all the help I can get.
- The topic ‘Problems with categories, wp_term_taxonomy and wp_terms – new upgrade’ is closed to new replies.