I published an article with permalink slug:

http://domain.com/writing

Then after publishing, I changed the permalink slug to writing-lorem. Now, whenever I visit /writing, it redirects to /writing-lorem.

I want to use the writing slug for a new category but can’t, it changes to writing-2.

To attempt to remove all records of the writing slug, I looked in the DB for the post_name column under that post, but the value was the new slug writing-lorem.

Then I search for other posts with the writing value, none found.

Where exactly is that slug stored and how can I remove it so that I can use it for the category?

2 s
2

It’s in the table postmeta with the meta_key of _wp_old_slug

If you wanted to clear all of the old slugs you could use this:

DELETE FROM wp_postmeta WHERE meta_key = '_wp_old_slug';

Leave a Reply

Your email address will not be published. Required fields are marked *