If you run a WordPress MU installation then you’re more than aware of the growing problem with spambots out there creating blogs to simple load links back to their spam sites. New WPMU installations can expect to be found and attacked within a few days of going live and if you have an open registration process, well, be ready to spend a lot of time weeding out the spam blogs.
My WPMU site Stampin Corner started getting hit the day it went live and I’d see between 5 an 15 new spam blogs created every day. After searching around and trying several solutions intended to stop the bots, and getting frustrated none of them really worked, I decided to just modify an existing plugin that I use on my regular WordPress installations.
It’s called WPMU Block Spam By Math. It’s based on the simple, yet highly effective plugin Block-Spam-By-Math created by Alexander Grau. Where Alexanders plugin protects your blogs registration, login and comment forms from spambots, WPMU Block Spam By Math protects your new blog creation process and the new user creation process.
It’s a simple plugin really but I find it to be highly effective at what it does. By simply adding math question to workflow (something like “what is 5+2 ?”). I won’t say it’s 100% effective but after adding this plugin to Stampin Corner two weeks ago, I’ve not had a single spam blog created (knock on wood).
Installation is simple:
- NOTE: As of version 1.2 of this plugin you must have Buddypress 1.2.3 installed. For prior versions of BP you will need an older version of the plugin.
- Download the plugin from WordPress.org.
- Copy it to the wp-content/mu-plugins directory of your blog.
That’s all there is to it. You should now start seeing a dramatic reduction in the amount of spam blogs you see created. NOTE: This does not protect against those spammer who take the time to manually create spam blogs on your site. For those I recommend barbed wire and toothpicks under the fingernails.
If you are using BuddyPress this plugin should still work fine unless you are using the default BuddyPress theme. If you want this plugin to work with the ‘bp-default’ theme you need to make a manual edit to create a new hook location. The process is very simple.
For versions of BP prior to 1.2.2
Open your wp-content/themes/bp-sn-parent/registration/register.php file.
Locate this line of code (approx. line 215).
<?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?>
BELOW this add this line of code:
<?php do_action( 'bp_before_current_signup_step' ) ?>
For versions of BP 1.2.2 and newer (tested on 1.2.3)
- Simply install/upgrade the plugin
I completely skipped 1.2.2 but since it was reported the plugin wasn’t working correctly on that version I’m going to assume the problem was the same. If you are on 1.2.2 and still have problems upgrade to at least 1.2.3.
It appears BP is now able to bundle their default theme within the plugin directory and in doing so added a new hook which I had to manually add in previous versions. This update applies to an unaltered install of BP 1.2.3, if you have the older BP default theme in your wp-content/themes directory you should be able to delete it then activate the new default theme which resides in wp-content/plugins/buddypress/bp-themes/bp-default. (NOTE: This plugin will no longer work properly using the older default theme if you’ve upgraded BuddyPress).
There are NO manual edits for this version of BP just be sure you have downloaded and installed version 1.2 of the WPMU-Block-Spam-By-Math plugin. It should as simple as auto updating Buddypress and updating WPMU-Block-Spam-By-Math to the latest version (download from Codex or use link above) then switching your theme to the new Buddypress default theme.
- Does this plugin work with the regular Block spam By Math plugin?
Yes, you can run both. I use the regular WordPress plugin on my WPMU site as well to allow individual site owners the option to add the protection at the blog level.
- Does this plugin work on regular WordPress?
No. This is only targeting the WPMU new blog signup and new user signup functions. If you need WP registration, login and comment protection I recommend you get the Block Spam By Math plugin.
- Change I change the math questions?
Yes, just edit the two rand functions in the plugin file to generate whatever type of numbers you want.
- Does this plugin work with BuddyPress?
Yes. See the Buddypress note above under installation. You have to perform a manual edit in order for it to work with the default Buddypress theme.
If you like this plugin and want to support me, leave a comment or check out my donations and support page!