WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Page Revisions lost for just one page, not all pages. How to retrieve? (3 posts)

  1. David Borrink
    Member
    Posted 4 years ago #

    I have a site where one page's content has disappeared from the content, and there are no Page Revisions listed at the bottom to restore it. Yet.... other pages have many versions listed.

    Is there someway to restore this one page's versions by doing something to the database? Or should I just tell my client they'll need to create that page again? Maybe a new file (new page id# as a result?)

  2. Mark / t31os
    Moderator
    Posted 4 years ago #

    Well you'd need to verfiy revision(s) do exactly exist first, you can't restore nothing from nothing.

    Check the database first, run a repair, just to clean up any table issues(if any exist), then query the db(via phpmyadmin would be easiest) for a revision with a post_parent of the post ID that matches that of the problem one in question...

    eg.

    SELECT * FROM wp_posts WHERE post_type = 'page' AND post_type = 'revision' AND post_parent = 12345

    If you get no results, then it's gone, too late (short of having a backup file that contains the data), but do be sure to replace 12345 with the actual ID, of couse.. ;)

    If you get matches, then you know they're there, so it's somewhere to start(ie. do you, or do you not have them in the db - can't do much without knowing this first).

  3. David Borrink
    Member
    Posted 4 years ago #

    Thanks, t31os_,

    My results in PHPAdmin:

    MySQL returned an empty result set (i.e. zero rows).

    So it's gone. This happened back in January so I'm going to have my client create a new page with a new ID. Hopefully it's just a quirk and this new page will be okay.

Topic Closed

This topic has been closed to new replies.

About this Topic