WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] purging old slug definitions (4 posts)

  1. tallhat
    Member
    Posted 4 years ago #

    i've got a weird problem with pages not displaying correctly. it seems that WP is remembering some old slug definitions and is for some reason turning 'pages' where i reuse those slug definitions into 'posts'! very odd...

    i've tried deleting stuff and emptying trash but they seem to be remembered somewhere. how do i purge unwanted/old/deleted 'slugs'?

    if i edit the slug for a problem page to something new the page displays fine. if i edit the slug back it does the weird thing again.

  2. MichaelH
    Member
    Posted 4 years ago #

    Those 'old' slugs are kept in the postmeta table. Using phpMyadmin you could delete them ALL with:

    DELETE FROM wp_postmeta WHERE meta_key = '_wp_old_slug';

    Or delete them individually in that table.

    Backup your database before attempting.

  3. tallhat
    Member
    Posted 4 years ago #

    turns out the 'old slug' bit was a red herring.
    it actually seems to be a really weird (and inconsistent) conflict between an uploaded image 'title' and a page slug. the fix seems to be to delete the image in question and reupload.
    hard to replicate the problem as it's inconsistent, so not really sure what really happened...

  4. E Anderson
    Member
    Posted 4 years ago #

    Note: Also have to delete the old page from the "trash" folder before you can use the old slug.

Topic Closed

This topic has been closed to new replies.

About this Topic