• Skip to primary navigation
  • Skip to main content
  • Skip to footer

WPJohnny

WordPress Performance Guides and Reviews

  • Start a WordPress site
  • Hosting
  • Themes
  • Plugins
  • Blogging
  • Marketing

Removing WordPress user registration spam

WordPress plugins Jul 3, 2021 by Johnny

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

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.sql to 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.

Final notes:

  • 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.

Share this post:

Share on FacebookShare on X (Twitter)Share on LinkedInShare on WhatsAppShare on EmailShare on SMS

Read all my posts on WordPress plugins

About Johnny

Right on the edge of WordPress development! 10+ years of WordPress design, development, hosting, speed optimization, product advisor, marketing, monetization. I do all that.

More WordPress Guides

Best WordPress Recipe Plugins Review

What’s a CDN? (Content Delivery Network) And do you need it?

Github cheatsheet

LiteSpeed Cache WordPress Plugin – UNOFFICIAL GUIDE

Not a fan of Pinegrow for creating WordPress themes

Website Design Workflow Tips – Avoid Endless Revisions

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Footer

More links

  • Gadget reviews
  • Try my free WPJ plugins
  • Join the WPJ FB Group
  • WPJ YouTube & newsletter
  • Become a WPJ Affiliate

Popular Reviews

  • Best WordPress Hosting
  • Best WordPress Themes
  • Best WordPress Plugins
  • Best WordPress Cache Plugins

Services

  • Speed optimization
  • Speed optimization courses
  • WordPress hosting
  • Hire me or other experts
  • Client login

About Johnny

10+ years of WordPress design, development, hosting, speed optimization, marketing.
Contact me.

newsletter block

Copyright 2025 | WordPress guides by Johnny Nguyen

Click to Copy