depicus

  just another nerd on the interweb…



  • home
  • gallery
  • play page
  • privacy
  • support
  • videos
  • what is depicus

Posts Tagged ‘mySQL’

Finding Spambots in your WordPress Database

Thursday, July 28th, 2011



If you run a WordPress site you will know that spambots will try and post at an alarming rate to your site. Now there are plenty of spam filters but they don’t always catch users who register and do not post. I have hundreds of these spam users and wanted a quick way to find them.

Well here is an SQL query to find users that have registered but not posted anything – note this is for WordPress used with bbPress

View Code SQL
1
2
3
SELECT * FROM wp_users WHERE 
(SELECT Count(*) FROM wp_posts 
WHERE wp_posts.post_author = wp_users.id) = 0

Now I just need to find a way to bulk delete these users :)

Tags: bbPress, mySQL, SQL, Wordpress
Posted in Interweb | 2 Comments »

  • how i pay the bills

  • depicus in africa

    depicus in africa
  • my charity page

    JustGiving - Sponsor me now!
  • friends

    • Agency Manager
    • AllClear Travel
    • Climbing Tikes
    • Globe Bloggers
    • Marchday
    • The Travel Toad
  • gallery

    IMG_4694 IMG_3203 Bisley Developments Ltd IMG_2570
  • videos

    Vimeo

    YouTube
  • twitter

    • No public Twitter messages.
  • recent comments

    • john coull: correction to above, its www.oakley-ukstore.com
    • john coull: they are at it again. adverts on facebook . they are being hosted by enotch.com on ip address...
    • steve: The site are selling £120+ Oakley sun glasses for £13.00 I think its safe to say they may be either...
    • rob: have received a pair of glasses not what ive ordered they are now telling me the ones ive ordered are out of...
    • phil: hi i have purchased some (stupidly),not arrived yet, will they arrive/will they be fake/plz help

Copyright © - depicus | Entries (RSS) | Comments (RSS)

WordPress theme butchered and amended by me.