Accidentally Deleted Thread


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


Well-known member
If you just removed it from public view, yes, You can undelete.

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


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 :)


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!!!
Reactions: Vet