WordPress.org

Support

Support » How-To and Troubleshooting » HOW TO: Change Category ID’s in WordPress 2.7

HOW TO: Change Category ID’s in WordPress 2.7

  • I recently needed to change my category ID’s in WP 2.7 to make sure my MIMBO theme using VIVA Thumbs plug-in chose the right default category image if 2 categories were added to a post, as it chooses the one with the lowest number.

    Seeing as I have no MYSQL knowledge it is remarkably simple – here’s how.

    1. Make a full backup of your database in case something goes wrong. I use – This Wordress Database Backup plug-in.

    2. Write down all your categories and their current ID’s. You can find them out by going to the category section of your WordPress Dashboard and hovering over the category names. The ID will appear in the bottom of the browser window.

    3. Access your database with phpmyadmin.

    4. Select the wp_terms table and locate the Categories by their term_id number.

    5. Click the pencil icon and change each term_id value to the desired number. Choose high numbers to avoid clashing with other ID’s for tags or link categories etc. I choose 1010, 1020, etc.

    6. Then select the wp_term_taxonomy table.

    7. Go through this database and locate the entries with the OLD term_id values of your categories and edit them to read the same as the term_id values you just entered in the previous step.

    8. You are now done. All your posts associated with those categories should still be so.

    9. You will now need to go through your template and replace any category specific codes.

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘HOW TO: Change Category ID’s in WordPress 2.7’ is closed to new replies.