A moment ago, I decided to upgrade to the latest Wordpress version, I was running a bit behind on 2.2.3 :)

The upgrade went quite smooth, all my plugins still work. But suddenly all my categories became empty strings. And the /tags/ urls didn't work anymore either.

After looking around a bit, I noticed my categories were stored in the wptermtaxonomy table, with empty descriptions. Thankfully I had a backup and manually entered the descriptions for all of them.

At this point, their names showed up in the admin section again, but the post weren't linked to them yet, neither did the /tags/ work.

A little more looking around, and I figured out to access categories.php?action=edit&cat_ID=20 for each category, where I had to enter the category name and category slug.

For some reason, each category's slug was suddenly named -2-2-2-2-2-2-2-2-2-2-2-2-2, with increasing -2 per category.

After doing all that, my /tags/ work again, and my posts seem to be linked again :)

If you notice anything broken, please comment to let me know!

 
Comments: 16
 
  • It does take courage to upgrade right after making a blog posts, which gets stubmled upon ;)

    Note to self: Install a cache plugin to prevent slashdot-effect :p

     
     
  • Turned on WP-Cache, we'll see how that goes in the future :) Interesting to know, my site got quite slow when 600 people visited it in 30 minutes ;)

     
     
  • When you manually changed the wp_term_taxonomy in phpmyadmin, how did you actually do that? I was able to empty the table, but I can't paste the info from the backed up file. Any suggestions?

     
     
  • I didn't empty the table :s

    I updated each record to add the description again.

    The id's per record matched the id's of the old table I had exported (can't remember the name right now, guessing wp_categories)

    Also, the article counts matched up for the records, confirming my thought that the id's were correct.

     
     
  • Hi there,

    Have you any advice for anyone without the brains or the courage to be able to edit database tables. I lost all my categories too and dont know what to do.

    Cheers - Glenn

     
     
  • Hi Glenn,

    I assume you have a way to administrate your database right? Using phpMyAdmin or something?

    If you give me a day, I'll write a small blogpost on it with screenshots :) Since the question has been raised a few times already.

    In the mean time, whatever you do, don't delete anything from your database! Just live with the blank descriptions for a moment :)

    Also, you can already get your backup file somewhere close, because you'll need the original category names back (unless you remember them by heart :p)

    Stay tuned :)

     
     
  • hey David... i still dont know why i coulnt think something like that :P

    Many thanks for this idea! i'll try this solution... which is better than go to myphpadmin and then edit everything there :)

     
     
  • Leandra, Glenn, Mariano,

    Have a look at this short explanation with screenshots for more details: http://blog.cumps.be/wordpress-26-upgrade-fix-missing-categories/

     
     
  • David.. you rock :)
    I've just finished the "not-so-techie-way" but this link is great :)

     
     
  • David,

    Thank you for a very clear explanation to this problem. After upgrading three client blogs yesterday to 2.6 they lost their categories, and needless to say they were onto us shortly after.

    You've saved me some headache, and the blogs are back and happily trotting along on 2.6!

    Cheers!

     
     
  • It was a surprise when noticing all categories are gone after upgrading WordPress from 2.2.1 to 2.6. It seems the best way to bring category back is to edit wp_term_taxonomy table directly to put each category name back with matching ID as what's in the old wp_categories table. I think this is a bug. The upgrade script should take care of this type of issue.

     
     
  • I just saw your solution to the problem and I see you have to do it manually. If you have too many categories and you have some PHPMyAdmin (or you are used to work with MySQL databases) here is a simple, fast solution:

    http://nideaderedes.urlansoft.com/2008/07/30/my-categories-dissapeared-after-upgrading-to-wordpress-26/

     
     
  • Thanks again for the great tutorial!

     
     
  • THANK YOU SO MUCH! You are a life-saver. I'm glad I stumbled across your post in the wordpress forums. :D

     
     
  • Max

    I hope you can give me a quick hand. Using your excellent guide, I have restored my categories; however, I have been unable to restore the Blogroll. The links remain but I cannot adjust seem to restore this important Link Category.

    Any suggestions or direction would be MUCH appreciated.

     
     
  • I tried accessing wp_term_taxonomy from myphpadmin but the same shows as crashed :(

    Any help?

     
     
  • Leave a reply
    Items marked with * are required. (Name, Email, Comment)
    Comment is missing some required fields.
     
     
     
    To make sure you are not a computer, please type in the characters you see.