Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

How to I bulk delete comments?

Go to End

5 Posts   2283 Views


Community Member, 64 Posts

25 June 2009 at 6:15pm

I have used SS for a client, now realizing he has 5000 spam messages on one of the pages that allowed comment posting.

Can anyone tell me how I can bulk delete all 5000 spam comments in one go? the admin "comment" tab can only allow me to check and delete 15 comments at a time, deleting 5000 spam comments can take all day.

Any tip will be much appreciated!!



Community Member, 904 Posts

25 June 2009 at 6:51pm

Ouch that sucks. Did you install some sort of anti-spam protection (mollom)?
I'd simply delete the entries from the database. Something like:

DELETE FROM PageComment WHERE ParentID = <YourPageID>

If the comments have been marked as spam, do:

DELETE FROM PageComment WHERE IsSpam = 1 AND ParentID = <YourPageID>


Community Member, 64 Posts

26 June 2009 at 4:54pm

Cool, thanks for the support! I now have included a Math question in the comment posting:


Hope this will be sufficient for now. Cheers!!

I am now trying to figure out how to include the math question on the user defined forms, any tip?

Much appreciated!!


Community Member, 64 Posts

2 July 2009 at 10:23pm

Hi there, I thought knew how to do the:

DELETE FROM PageComment WHERE ParentID = <PageID>

I have logged in to mySQL and don't know how I can execute this line, could you please briefly run me thru this?



Forum Moderator, 5523 Posts

3 July 2009 at 5:42pm

don't know how I can execute this line

If you are using phpMyAdmin then select the database on the left, then click the SQL tab and enter the command