Top

How to Change WPMU Category Name or Slug

April 29, 2008

I tried to edit my Wordpress MU Category information such as category name and category slug. What happened at first is that often the category entry is totally replaced by a Tag entry. Other times, the category record's new information is not saved at all. I troubleshot the problem and here is some temporary solution for a MySQL literate user.

The problem

When attempt to change category name or slug, the category ID is gone and replaced with a new number, which is the ID of an existing tag. The worst thing is that the old misplaced category record completely disappeared from both the blog and the Categories editor page.

This problem happens even when changing only category hierarchy (super & sub category relationship). The replacement appear to be random. It doesn't replace with a Tag that has exactly the same slug. In fact, the category record is unchanged if the slug is the same as another category's lug or another tag's slug,

Example 1

  Category ID Category Name Category Slug
Old value 1 Official Log log
New value unchanged Site Logs logs
Result 50 PHP php

Example 2

  Category ID Category Name Category Slug
Old value 10 WordPress Themes wp-themes
New value unchanged unchanged themes
Result 49 Tweaks tweaks

Safe Method to Modify WPMU Category

I don't have a really good solution yet. At this time I've been hacking into the database to modify the slug value. You can follow the same steps too::

  1. Open phpMyAdmin for your WordPress MU Database
  2. Browse table wp_#_terms (# is the number of the blog being modified)
  3. Search existing term record that have slug the same as the slug value you want to give to that category. Modify that existing slug to something else, because it's a slug of a tag (not as important as your category).
  4. Search for the category you want to modify. Change the values to what you want.

Tags: category name, category slug, wordpress mu, WPMU category

Related posts

Comments

3 Responses to “How to Change WPMU Category Name or Slug”

  1. Amaury on January 21st, 2010 4:12 pm

    I create a ticket for this bug :
    http://core.trac.wordpress.org/ticket/11962

  2. Ekaterina on February 9th, 2010 8:21 am

    Hello! I have exactly the same problem as you! Haven't you found better solution yet?? If yes, please share it with me, I need it very-very much!!! And I don't understand what happened with my site that it got such stupid error...

  3. Tim on March 26th, 2010 4:21 am

    Hi Binh, I know this post is old, but did you by chance find a solution to this issue? We've started a thread on this in the hacker list - http://lists.automattic.com/pipermail/wp-hackers/2010-January/030132.html

    Any thoughts?

Got something to say?





Bottom