WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Post-slug rename breaks permalinks (4 posts)

  1. meckhert
    Member
    Posted 8 years ago #

    I am having trouble with Permalinks for static pages when I rename a post-slug.

    Permalinks work fine on my site when I create a new static page, giving a post-slug of 'mypost'. I can access the page using http://mysite/mypage just fine. Once I rename the permalink though, say to 'yourpage', I cannot access the page with either http://mysite/yourpage or http://mysite/mypage.

    I have confirmed that the post_name column in the wp_posts table is being updated properly. I have tried regenerating the permalink structure after I rename the post-slug. I can still access the page using the ?page_id=X format, but that defeats the whole purpose. If I change the post-slug back to 'mypage', everything works again.

    I'm running on a Windows machine with Apache 2.0.55 with PHP 5.1.2 and mod_rewrite enabled, and MySQL 5.0.18-nt. Any help would be greatly appreciated!

  2. meckhert
    Member
    Posted 8 years ago #

    I finally figured this out. It turns out that something is not right with the way WordPress updates the rewrite_rules value in the wp_options table when a post-slug is changed. In order to fix this, I manually went into the wp_options table and deleted the option_value for rewrite_rules. Then I used the permalinks panel in wordpress to regenerate the permalink structure, and like magic, all of my permalinks started working again.

    I hope this saves someone some time in the future.

  3. Chris_K
    Member
    Posted 8 years ago #

    Thanks for the update! You might chech http://trac.wordpress.org and see if anything similar has been reported. If not, would you consider opening a new ticket referring to your info in this thread?

  4. meckhert
    Member
    Posted 8 years ago #

    Good idea HandySolo. I created a new ticket (#2850).

Topic Closed

This topic has been closed to new replies.

About this Topic