Reply To: Stop BuddyPress SPAM
Two more methods that help. I recently had a crazy spam attack – probably 300 fake signups per day. I implemented these two methods and it dropped to near 0.
1. Change the /register/ slug to something unique. An example would be /create-your-account/, or something of that nature. It just needs to be unique and also make sense in a URL for your user. Spammers targeting BuddyPress look for /register/ as the signup page. It’s all automated so you want to filter them out at the first step.
2. Add this to your functions.php file in your theme or child theme.
It presents a dummy field that humans don’t see. Spambots will fill it out, and if the field captures a value it will reject the signup.
// BuddyPress Honeypot
function add_honeypot() {
echo '';
}
add_action('bp_after_signup_profile_fields','add_honeypot');
function check_honeypot() {
if (!empty($_POST['system55'])) {
global $bp;
wp_redirect(home_url());
exit;
}
}
add_filter('bp_core_validate_user_signup','check_honeypot');
Credits for #2 go to:
http://mattts.net/development-stuff/web-development-stuff/wordpress/buddypress/anti-spam-techniques/registration-honeypot/
I edited it slightly to remove the required redirect. Add that back from his tutorial if you want to. It requires that you make an extra page to send the spammer to, and I personally think that’s not necessary. I actually want them to have no indication their signup failed.