• Hello. I have recently lost all of my tags and categories. I still have my posts, though. I have over 200 posts so as you can imagine it would be incredibly time consuming to manually re-add all of them. I do have a backup that was made with the built-in WordPress export tool. Is there a way to import just the tags and categories that were associated with the posts? This is a really big problem for me.

    Thanks,
    Stephen Hobson

Viewing 10 replies - 1 through 10 (of 10 total)
  • Are the tags and categories still recorded in the database? Are you able to check?

    It would be very odd for this information to disappear on its own …

    Thread Starter Rivahratt95

    (@rivahratt95)

    Yes they are still in the database. The problem is that they are no longer associated with any of my posts.

    That’s very odd, indeed. Do you know what might have caused the problem? Any new plugins or themes?

    The reason I ask is because importing just the categories and tags from a backup may not restore the proper links to your posts. If we can find the cause, I can probably write a quick MySQL update query for you that will fix this …

    Thread Starter Rivahratt95

    (@rivahratt95)

    As of right now I am not sure what caused the problem. I logged in to write a new post and they were all gone. No new plugins or themes have been installed.

    Wow … I’ve never heard of anything like this happening before. Let me check some stuff in my own database, and I’ll see if there’s a relatively simple way to re-link these things 😕

    Thread Starter Rivahratt95

    (@rivahratt95)

    Okay. Thanks. 🙂

    I’ve done some digging, and now I have a few questions:

    1. Can you query your database directly?
    2. If yes, do you still have data in the wp_terms and wp_term_relationships data tables?

    If the answer to all these is “yes”, it may be an error somewhere up front rather than in the database. If the answer is “no” (especially to the second question), then you may need to update all your posts by hand or do a full restore of posts, categories, and tags … which would create all kinds of mess thanks to the partial-data found in the export function.

    Let me know if you still have data, and I can give you a few things to look at from there.

    Cheers,

    Thread Starter Rivahratt95

    (@rivahratt95)

    Well, unfortunately it looks like I will have to add them manually. This is going to be a long night. 🙁

    Seems that way. I couldn’t do it, though … over a thousand posts, and dozens of pages. I’d throw everything older than a month into “Archives” or “Miscellaneous”, focusing only on the articles from this year and a few select pieces that has brought the most traffic since the start of the site.

    That’s just me, though …

    Thread Starter Rivahratt95

    (@rivahratt95)

    Thankfully I don’t have that many posts. I could not bare doing that either. That is a good idea that you have but I think I will just add things by hand. In the end I think I will be glad that I did it. Even though we did not get my problem fixed, I really appreciate your help.

    Thank you,
    Stephen Hobson

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Importing Tags and Categories’ is closed to new replies.