Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
501 views
in Q2A Core by
There are more than 19000 posts awaiting moderation which is impossible to clear manually. Almost all of these are spam and I would like to clear it all. Is there a way to do it easily?
Q2A version: latest

1 Answer

0 votes
by
edited by

I don't think the Web UI provides a simple way of doing this, but you can easily remove those posts directly from the database. All posts under moderation have a type ending with the suffix "_QUEUED," so you can use that as the filter for a DELETE query.

DELETE FROM qa_posts WHERE type LIKE "%_QUEUED";

If you want only a particular type of post removed (e.g. only questions), change the filter to that type (e.g. type="Q_QUEUED").

Note that removing posts under moderation directly from the database will not automatically reset the counter for those posts, so you'll have to do that yourself as well.

UPDATE qa_options SET content=0 WHERE title="cache_queuedcount";

...