Todd Vance
Todd Vance

Reputation: 4721

Wordpress permalink names are saved somewhere and I want to clear them out

I'm taking over a wp site that was not completed. All the pages that had been created were deleted.

I created a page and tried to rename its permalink to 'volunteer'.

However, I SUSPECT this page was once created because when I edit it and name it to /volunteer ... it automatically saves it as /volunteer-2 ?

IF I create a random named page ..i.e. testingPage, it will save the permalink like that just fine.

(My permalinks setting is set to: /%postname%/) ...

SO I am pretty sure there is a list somewhere of previously saved page names... can someone tell me where thats at and how I can clear it?

Upvotes: 1

Views: 6389

Answers (2)

Yahia
Yahia

Reputation: 70369

Permalinks are not saved but dynamically generated depending on your settings.

The %postname% is a column called post_name in a table called wp_posts... in theory you could just change whatever is saved there BUT I suspect that this is dangerous!

For a query that gets the permalinks see http://wp.daveheavyindustries.com/2011/02/08/wordpress-permalink-via-sql/

Other information:

Upvotes: 2

Jan Fabry
Jan Fabry

Reputation: 7361

Are the deleted posts deleted from the database or just placed in the WordPress "Trash"? When you save a post, it gets a unique "slug" which is used in the %postname% part of the URL. Posts that are in the "Trash" still exist in the database, so the code picks it up. If you remove the old posts from the database, you can use the name again.

Upvotes: 3

Related Questions