An appreciation plugin for the User Spam Remover plugin.
This isn’t a post on stopping user registration spam. It’s about what to do once you already have it. I can show you how in (about) 3 simple steps.
1. Install User Spam Remover
2. Run the “remove spam users” now.
- Go to Users > User Spam Remover, and check the box for “Enable”, then adjust the number in the “Age threshold (in days)”. Ideally, this number should be 1 day less than the most recent spam user registration.
- Then click the [Remove spam/unused accounts now] button. You may have to repeat this several times, as it only deletes 1K accounts on each run.
I found this plugin easiest to use if you have many spam users and only very few legitimate ones. If you have many legitimate ones, you’ll need to whitelist a full list of usernames (say, only WooCommerce customers) in “clever developer manner”.
3. Restore legitimate users (if needed).
If all important users are still there, then you’re done. If many legitimate users are missing:
- Download the restore file from the plugin directory
/wp-content/plugins/user-spam-remover/userspamremover.restore.sqlto your computer. And open it with any text editor. (Code editor is probably better and less likely to crash your computer.)
- Search for the user name or email, you should see in 2 places of the restore file.
- Now open up your webhosting phpMyAdmin, and click on the [SQL] tab.
- Now you’ll copy off the instances of the user records into the SQL tab. The first instance is a full line, paste it and hit ENTER to drop to the next line. The second instance should be a whole bunch of rows with the same user ID, paste them all into the SQL tab beneath the first line you pasted.
- Then click [GO] at the bottom and your user should be restored.
- Easy way to stop user registration spam? – Go to Settings > General, and uncheck “Anyone can register”. Don’t worry, WooCommerce customers can still sign up.
- Or you can use any of the many user spam blocker plugins out there. Simply search “user spam” in the WordPress repo. They all have different mechanisms for blocking user spam.
- Yes, I’m aware the User Spam Remover plugin hasn’t been updated in a while. It still works fine for me.
- For extra help or FAQ, see the User Spam Remover page.