Hard Delete?

Drae

Active member
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?
 
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...
 
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.
 
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:
 
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? :)
 
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...
How can I achieve the same with xenForo 2.0? There also deleted post have the message_state at 'visible'.
 
Back
Top Bottom