Support » Fixing WordPress » Categories disappeared

  • Hello, the problem is that after I cleaned my website from unnecessary tags, two categories disappeared, I do not see them in the admin panel, in the “category” section.

    Here is commands that i used in phpmyadmin to delete tags …

    DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE count = 0 );
    DELETE FROM wp_term_taxonomy WHERE term_id not IN (SELECT term_id FROM wp_terms);
    DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy);

    The fact is that the site goes over the links and when creating a new post, I can put it in that disappeared category … So i can’t see them only in my Category section, is there a way to fix it?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • You should never delete or use delete command unless you tried to simulate it on a staging site or something. Also, It’s safe if you use default WP function if you’re going to delete a category. Not an SQL script.

    now i know that!!! i there possibility to restore them?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Categories disappeared’ is closed to new replies.