How to fix “The slug is already in use by another term” in WordPress

A common error that WordPress users may encounter when adding or renaming the category slug is “The slug is already in use by another term”. It’s not a bug or an issue with WordPress core. This usually happens when the slug you are trying to add is already in use by another category or tag on your blog. You can easily fix this problem by either renaming or deleting the conflicting tag from your database table.

There are 2 ways to fix this error in WordPress:

Solution 1:

Luckily, there is a very easy fix. Please follow the steps below to rectify this issue within your WordPress admin area.

  • Log in to your WordPress dashboard.
  • Go to PostsTags > Search for the tag you are trying to add and either rename it or delete it. Then you will be able to create or rename to your desired category slug.

Solution 2:

This tutorial demonstrates how to fix this error through wp_terms database table in phpMyAdmin. phpMyAdmin becomes very handy when you are unable to rectify the conflicting slug in WordPress admin area. Please follow the steps below:

1.  Log in to your cPanel and click the phpMyAdmin icon in the Databases section.

2.  In phpMyAdmin you will see a list of your databases in the left menu. Select the database that you will be working with.

3.  Once you have selected a database, a list of tables appear on the left pane. Locate and click on the table named wp_terms. (This table holds the values of the names and slugs for all your taxonomies).

Note: If you have multiple WordPress install, then each site has a different table name prefix. However, if you have a different table prefix than the default “wp_” , replace “wp_” with your actual prefix.

4. In the slug column, Look for the slug which is similar to the slug you are trying to create and click Delete.

That’s it. Now WordPress will allow you to create or rename to your desired slug.

Leave a Comment