1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Accidentally Deleted Thread

Discussion in 'Troubleshooting and Problems' started by Vet, Sep 14, 2011.

  1. Vet

    Vet Member

    I accidentally deleted a thread thinking I was deleting a post. Is there a way to recover the thread?
  2. James

    James Well-Known Member

    If you just removed it from public view, yes, You can undelete.

    If you hard deleted, no - it's gone.
  3. Vet

    Vet Member

    Well that's a huge lesson on my end. Thanks for the speedy response.
  4. IanC

    IanC Active Member

    Do you have any old backups of the site? You can re-insert just that row and it shouldn't cause any problems :)
  5. Vet

    Vet Member

    How do I go about doing that?
  6. IanC

    IanC Active Member

    If you've got a backup, import it to a new database (you don't want to overwrite the existing one!) and use a graphical MySQL manager (I use SQLYog) or phpMyAdmin to find the thread in your xf_thread table. Export that row to an SQL file or copy the row insert information.

    Then, use that thread ID to lookup the matching posts in the xf_post table (using something like "select * from xf_post where thread_id = x"). Export those posts in the same way.

    You can then import just those row to your existing database and run a recount :).

    Of course, be sure to backup your current database too - as I wouldn't want this to break anything!!!
    Vet likes this.

Share This Page