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

Hard Delete?

Drae

Active member
#1
I have the admin set-up so they can delete and hard-delete. As the admin I have deleted a few old posts and now want to hard-delete them. How do I do this?
 

Chris D

XenForo developer
Staff member
#3
You can use this SQL query to hard delete all 'soft' deleted posts:
Code:
DELETE FROM `xf_post` WHERE `message_state` = 'deleted'
Obviously you may not want to do them all so you might want to add other criteria into the query.

Or you may just want to view your deleted posts which would be:

Code:
SELECT * FROM `xf_post` WHERE `message_state` = 'deleted'
EDIT: By the way, I'm not certain if there's other things you'd need to do to "clean up" after hard deleting posts...
 

Jake Bunce

XenForo moderator
Staff member
#6
Using queries to hard delete posts can work, but it's not the cleanest thing to do. You will end up with orphaned records in other tables such as attachments. There is no easy way to do this cleanly with just queries. Ideally hard deletes should be done using the inline moderation tools.
 

CTXMedia

Formerly CyclingTribe
#8
Plus giving your admins/moderators hard delete access can end in a disaster if one of them were to get pissed and hard delete everything.
I was just about to post this - good call. (y)

It's also the reason I never give anyone hard delete privs, not even my most dedicated, trusted and hard working mods. :coffee:
 

trilogy33

Well-known member
#9
As the admin I have deleted a few old posts and now want to hard-delete them. How do I do this?
XenUtiles has a function to prune the soft-dels after x number of days.
Features:
  • XenForo Sitemap (includes XenCarta and XenMedio extensions)
  • Unconfirmed account pruner after X number of days
  • Soft-deleted content pruner after X number of days
  • Account Spam Finder based on URLs in homepages, signatures and profiles
  • Profile Spam Finder based on URLs in messages and message comments
  • StopForumSpam registration integration and submission
  • BotScout registration integration
  • FSpamList registration integration
  • Thread down-vote system
Help much? :)