WordPress.org

Ready to get started?Download WordPress

Forums

Update all "post_name" and "guid" by the new title.. (2 posts)

  1. endgeek
    Member
    Posted 2 years ago #

    Hey guys,

    I'm looking for a plugin to update all the post_name and guid fields inside my db with the information the post title gives me at this moment..

    So if I post a new article and call it "Any Kind Of Title" and going to rename it to "Another Cool Title" the slug are still any-kind-of-title ... and so I'm looking for a way to keep all the slugs are up2date.. :)

    And Ideas? (except doing it by hand for every article... ;))

  2. jjyepez
    Member
    Posted 2 years ago #

    Not sure if this is what you are looking for, but .. hopefully this can fix it.

    You can do a bulk update (by hand) on your wp_posts table.

    UPDATE wp_posts set guid=replace(guid,"http://previous.domain/", "http://new.domain");

    UPDATE wp_posts set post_name=replace(post_name,"old-string", "new-string");

    WARNING: Since this is a BULK-NON-UNDOABLE update ... you MUST back up your data before executing any bulk changes.
    Please take care on this so I am not responsible for any mistakes or unexpected results.

    Regards and success,
    --
    jjy

Topic Closed

This topic has been closed to new replies.

About this Topic