Friday, July 25, 2008

WordPress Categories are back!

The most frightening thing that happened during this ordeal of upgrading to WordPress 2.6 was potentially losing ALL my categories.

You may have noticed my switching back and forth between different themes; this was partly because one theme didn't show any categories at all, and the other theme showed how many posts were in each category but did not show any category names. This made me believe the categories were there somewhere, but I couldn't find them.

Then I downloaded the database to a file so I could search it directly. Bad news – they weren't in it! The previous database had a section called Categories; the new database had nothing. Yet the fact that one theme showed the number of posts (and the numbers were correct) gave me hope.

My backup plan was to re-add each category, and then manually add them to each post. However, since I have almost 550 posts, I was also considering just not using categories at all..

A few more hours of searching, late at night, led me to David Cumps – my newest hero. David encountered a similar problem and discovered the solution. Turns out the category ID #s are still alive, but the rest of the category information got wiped out. David's 2-step solution: A) edit the database directly to add each category's description back in. B) type in the url for the edit page of each individual category's ID #, and when the edit page comes up you can input the category's name and slug. (very tedious, but MUCH faster than editing 500+ posts manually!)

Even better than finding the solution (or at least as good) is that David typed up a detailed post about it, including screen shots. I'm sure David spent several hours figuring out the solution; he didn't have to take more time to share it with us. But he did. And that's the beauty of the blogging community.

Your tired but happier than he was last night Realtor,

Chris Butterworth