WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Cannot rename existing category using old category's name (8 posts)

  1. thenextwave
    Member
    Posted 6 years ago #

    When I try to rename an existing Category to a previously deleted Category's name, I get a vague error about the rename failing.

    A peak in the wp_terms table reveals that Categories deleted from Manage Categories aren't actually deleted - they still exist in the database. Meaning I cannot add a category with the same name again.

    This is not the behavior I was expecting.

    My question is: How can I readd deleted Categories or rename an existing Category to something that was deleted?

  2. cili
    Member
    Posted 6 years ago #

    I'm having trouble with this too. Does anyone have any suggestions?

  3. hotkee
    Member
    Posted 6 years ago #

    Rename the deleted in the database, and create a new one in the frontend

  4. cili
    Member
    Posted 6 years ago #

    Sorry I'm a newbie- can you tell me how to rename it in the database? Do I have to edit a php file?

  5. thenextwave
    Member
    Posted 6 years ago #

    Cili - you need to use a database administration tool, like phpMyAdmin, to edit fields in the database.

    I think my real problem with this is not renaming a category in the database, it's that WordPress does not actually *delete* anything from the table. It is not the expected behavior.

  6. cusoon
    Member
    Posted 5 years ago #

    Thank you thenextwave !!!
    but which rows of database must be delete?

    thanks again

  7. cusoon
    Member
    Posted 5 years ago #

    is a plugin for debuging this ?

  8. lukep
    Member
    Posted 5 years ago #

    I was having a variation of this problem too. Whenever I had created a SUB (nested) category in a post (instead of directly on the category page) I'd get a long slug for that category that included the parent category in it, like this:

    /parent-category-todays-category/

    Worst of all, when I deleted it, it could only be added back again with that exact same slug again. :( - So naturally something had to be living in the DB with that slug in it.

    I was ripping my hair out over this until I found this thread,and looked in the wp_terms table in my PhpMyAdmin.

    Inside there, under the 'slug' column, I found the offender and deleted the record. It took all of 2 seconds.

    When I went to the category page to remake the cat, it finally worked. Woo-hoo!

    Note to WP Gurus:
    How about a fix for the post-page-nested-category issue in WP 2.9?

    Hope this helps someone else out there-
    Luke

Topic Closed

This topic has been closed to new replies.

About this Topic