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?
 

MagnusB

Well-known member
There is no way to easily find the threads that are soft deleted except going to the admin CP and check the mod log.
 

Chris D

XenForo developer
Staff member
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...
 

Drae

Active member
So the best/easiest thing would be to allow hard delete and not soft-delete?
 

Chris D

XenForo developer
Staff member
On my forums we tend to have a rule that everything gets soft deleted and it stays that way.
 

Jake Bunce

XenForo moderator
Staff member
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
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
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? :)
 

MagnusB

Well-known member
I have 2 super mods with hard delete capabilities, though they never use it, so in the end I end up hard deleting.
 
Top