My categories dissapeared after upgrading to WordPress 2.6

(tranquilos, no os asustéis, lo pongo en inglés porque parece que hay bastante gente perdida con este tema).

If you upgraded to WordPress 2.6 here is a solution that might help you:

The problem is that tables: wp_terms y wp_term_taxonomy have some information missing. Actually, fields ‘name’ and ‘slug’ in wp_terms have wrong information, and field ‘description’ in wp_term_taxonomy is empty.

Note: this solution requires some PHPMyAdmin knowledge. And, of course, you will need a backup of the older version.

1) First of all install your old database backup copy on your local MySQL server using (for example) PHPMyAdmin.

2) Export table “wp_categories” to a file. This table contains the missing information.

3) Go to the PHPMyAdmin in the server where your new WordPress is and import the file containing “wp_categories”.

4) Run this query to fill the table “wp_tems” with the correct information:

update wp_terms wt, wp_categories wc set wt.name=wc.category_nicename, wt.slug=wc.category_nicename where wt.term_id=wc.cat_ID

5) And for “wp_term_taxonomy”:

update wp_term_taxonomy wt, wp_categories wc set wt.description=wc.cat_name where wt.term_id=wc.cat_ID

6) Delete table “wp_categories”.

Hope it helps!

5 thoughts on “My categories dissapeared after upgrading to WordPress 2.6

  1. Thank you so much for this information. It was a huge help! The post in English was much appreciated as well 😉

    Also, here’s another query to run for those who have parent categories:

    update wp_term_taxonomy wt, wp_categories wc set wt.parent=wc.category_parent where wt.term_id=wc.cat_ID

Deja un comentario