• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Delete a large amount of unapproved threads & posts in MyBB
#1
If you have a large amount of threads requiring approval on your MyBB forum then rather than deleting them through the Admin CP you can bulk delete them all from a SQL query.

Normal method:
MyBB Admin CP > Forums & Posts > Moderation Queue


Delete using SQL query:
Log in to your database using something like phpmyadmin
Select the database
Select "Query"

Execute these queries one at a time and note down the returned result.

Code:
SELECT * FROM mybb_threads WHERE visible = 0;

Code:
SELECT * FROM mybb_posts WHERE visible = 0 AND replyto = 0;



To delete all threads requiring approval, execute this query:

Code:
DELETE FROM mybb_threads WHERE visible = 0;


The number of rows it deletes should match that of the first query which then should also match the number of unapproved threads.



To delete all posts requiring approval, execute this query:

Code:
DELETE FROM mybb_posts WHERE visible = 0 AND replyto = 0;



Rebuild the forum counters:
ACP > Tools & maintenance > Recount & Rebuild > Rebuild Forum Counters > Go.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Large database table mybb_debuglogs MyBB forum Mark 0 10,302 30-09-2014, 03:05 PM
Last Post: Mark
  [HOW TO] Automatically prune / delete unactivated users / awaiting activation MyBB Mark 0 11,726 20-08-2014, 01:36 PM
Last Post: Mark
  Owning spammers! How to easily "JUNK" threads Mark 0 6,960 25-11-2010, 07:43 PM
Last Post: Mark
  How to view IP address directly from posts Mark 0 4,948 19-10-2010, 12:57 AM
Last Post: Mark

Forum Jump: