I left a site unattended for a few months because I was busy elsewhere and without taking adequate precautions. As a result spammers have posted hundred of junk from viagra to porn and I have to shut it down temporarily. I need to
1. Remove all items posted AFTER a certain date , or
2. Remove all items containing key words e.g sex, viagra ,etc
Doing this manually will take me days. Can someone suggest a query that I can do or a module that will hunt and remove such posting .... or some other ideas?

Comments

chrispeat’s picture

I would suggest doing a simple SQL query through PHPMyAdmin to remove all the spam posts, this is how I fixed a similar scenario.

There might be better solutions but this worked for me (remember you might have to delete all nodes after a certain point rather than use the date specifically as there are related tables that will need to be cleaned up as well)

Chris - (trying - desperately - to earn qudos points for someone to look at my posts)

tryitonce’s picture

VBO - Views Bulk Operation module would be very useful - if you are familiar with Views.

You can configure VBO to almost anything, filter the nodes (content) you want to delete and do it all in bulk.

chrispeat’s picture

...a less techy and probably more reliable way would infact be VBO as tryitonce suggests. I'm an old school LAMP developer at heart and sometimes cant resist digging around the none drupal way....

Chris - (trying - desperately - to earn qudos points for someone to look at my posts)

jbmagar’s picture

I have also exactly the same problem . i tried USER DELETE module but it didn't work for me.
it has option for four action::

- DISABLE THE ACCOUNT AND KEEP ALL THE CONTENTS
- DISABLE THE ACCOUNT AND UNPUBLISH THE CONTNETS
- DELETE THE ACCOUNT AND MAKE THE CONTENT BELONG TO ANONYMOUS
- DELETE THE ACCOUNT AND ALL IT'S CONTENT

i set action to DELETE THE ACCOUNT AND ALL IT'S CONTENT and I deleted user, it deleted only user not the users post. all post became anonymous after user deletion.

any idea ? how did you remove those junk?

Thanks

tryitonce’s picture

VBO - try the module and play around with the options a bit - that should solve your problem