WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Change a page to a post and keep same permalink? (7 posts)

  1. Kudama
    Member
    Posted 5 years ago #

    Using phpMyAdmin, I can change the post_type from a page to a post.

    From the WordPress admin area, this seems to work fine. The page is now in the Posts area and I can add tags and such. In fact, I republish the post and it posts fine to my front page as the most recent post.

    But the single post permalink just sends me to my 404 page.

    If I change my permalink, say, from my-post-title to mypost-title, that works fine.

    But I have several existing pages which I want to change to posts and keep at the exact same URLs.

    I've tried just copying the content, deleting the page and then creating a new post, but that just creates the same problem. The new single post URL -- if identical to the old, deleted page URL -- still sends me to my 404 page.

    So what additional step do I need to take to clear the old permalink association in the database?

    I'd prefer to not do a 301 redirect or anything.

    Thanks!

  2. scribu
    Member
    Posted 5 years ago #

    You can't have two posts (or pages) with the same slug. You might want to try a plugin called Posts 2 Pages or something like that.

  3. Kudama
    Member
    Posted 5 years ago #

    I appreciate your taking time to respond.

    I don't want two posts or two pages or two anything. I just want a single post at a single URL/permalink/slug.

    I just want to clear the database of any evidence of the page, then take the same text and drop into a new post.

    The problem is that the database for some reason keeps a reference to a page that no longer exists. So after I delete a page, I can never use that URL/permalink/slug ever again. That seems silly and there must be a way around it.

  4. Kudama
    Member
    Posted 5 years ago #

    I can't believe this was the solution, but I found something that may work.

    I completely delete the page for 12 hours. THEN I repost it as a post.

    For some reason, the wp database doesn't like immediately reposting to the same slug/permalink, but if you wait a bit, it will do it fine... huh?

    Can anybody explain why this is? Is there a faster, more intuitive way to convert a page to a post?

    (I'll mark the thread as resolved if this works consistently on a couple more pages.)

  5. Kudama
    Member
    Posted 5 years ago #

    That didn't work.

    But the p2pconverter plugin works perfectly. All I did was stop searching by "change page to post" or "page 2 post" and similar phrases to CONVERT page to post and this fantastic plugin dropped into my lap.

    I can't believe how easy it makes it. You just a big ol' button within the page edit area and voila! Conversion complete. In case anyone comes across this thread looking for this solution:

    http://wordpress.org/extend/plugins/p2pconverter/

  6. scribu
    Member
    Posted 5 years ago #

    Ok, then mark this topic as [resolved].

  7. alfh
    Member
    Posted 4 years ago #

    p2pconverter is brilliant, thank you kudama!

    Change, convert or transform from post to page or page to post with a single click. It works on my wp 2.8.2 as well even if it only says compatible up to 2.7.1

    WP developers, can we have this as a built-in feature?

Topic Closed

This topic has been closed to new replies.

About this Topic