XF 1.5 SQL query to mass approve & move all "Moderation Queue" content to single thread?

rdn

Well-known member
We have 10,000+ Moderation Queue.
And we want to mass approve all of these but merge them all into single thread.

Can someone advice for the correct query?
Thanks!
 
Here is a start:

https://xenforo.com/community/resources/approve-all-moderated-posts-queries.373/

But in the UPDATE query for posts you can also set the thread_id, like so:

Code:
UPDATE xf_post
SET message_state = 'visible', thread_id = X
WHERE message_state = 'moderated';

Change X to the thread_id of the single thread you want to use.

Any moderated threads which are approved will end up empty since you are moving their posts. You may want to just delete those threads by replacing the UPDATE query for threads with this instead:

Code:
DELETE
FROM xf_thread
WHERE discussion_state = 'moderated';

This should be safe to do.

Backup first to be safe.
 
  • Like
Reactions: rdn
Back
Top Bottom