WordPress bot attacks happen because login pages, forms, and comment sections are open by default and follow the same predictable structure across every WordPress site. If you want to stop bot attacks for WordPress, the first step is understanding where they actually come from. The fix only makes sense once you know the cause. This article covers the real reasons WordPress sites get targeted, how Cloudflare stops them using two tools working together (the WAF and Turnstile), and how to set both up using Ultimate Security.
Table of Contents
What Causes WordPress Bot Attacks
WordPress runs a large share of the websites on the internet, and every one of those sites shares roughly the same login page, the same folder structure, and the same set of common features. A bot built to attack one WordPress site can attack thousands of others.
Here is a quick breakdown of where the trouble usually starts.
| Cause | What’s Happening | Why It Happens | Real Impact |
|---|---|---|---|
| Automated form spam | Bots fill out and submit forms repeatedly. | Forms are open to anyone by default. | Flooded inboxes, buried leads. |
| Brute-force login attacks | Bots try thousands of username and password combinations. | WordPress login pages follow a predictable pattern. | Account takeover, malware, and data theft. |
| Spam user registrations | Bots create fake accounts in bulk. | Open registration allows automated sign-ups. | Cluttered user lists and wasted database space. |
| Comment spam floods | Bots post links in comment sections. | Open comments are an easy target for backlink spam. | Poor user experience and potential SEO issues. |
| Bad bots and scrapers | Bots copy content or repeatedly request pages. | Scraping tools are cheap and easy to automate. | Slower websites and higher hosting costs. |
| XML-RPC abuse | Bots use XML-RPC to speed up attacks. | The feature is enabled by default on many WordPress sites and often goes unused. | Faster brute-force attacks and DDoS amplification. |
That table covers the shape of the problem. Here is what each one actually looks like day to day.
How Cloudflare Solves These Attacks
So how do you actually stop bot attacks for WordPress? Once you understand where the traffic is coming from. This is where Cloudflare comes in. At its core, the problem with all of the causes above is the same: your site cannot tell the difference between a real visitor and an automated script. Cloudflare solves this at two different points along the way, and using both together gives you far stronger coverage than relying on just one.
Cloudflare WAF: Stopping Traffic Before It Reaches Your Site
The Web Application Firewall filters traffic at the edge, meaning bad requests get blocked. This is the layer that blocks traffic from known data centers and TOR networks, both of which real visitors almost never use. It also challenges visitors from regions or cloud providers sending a large amount of bad traffic and shields sensitive paths like your login page from repeated hits.
Cloudflare Turnstile: Verifying Real Users on Your Forms
The turnstile works closer to the visitor, right on your forms. It runs quietly in the background. It only asks for extra verification when something about the request looks off.

Turnstile can protect your login page, registration form, password reset flow, and comments. On a WooCommerce store, it extends to checkout and account pages too, which matters if fake orders have been eating into your time.
Why Layering Both Matters
Relying on just one leaves a gap. The WAF stops a large share of bad traffic before it arrives, but some bots may still slip through and reach your forms. That is what Turnstile catches. Together, they cover both of the main routes bots use to reach a WordPress site.
The Easy Way: Manage Both With Ultimate Security
Setting this up manually means logging into Cloudflare, generating API credentials, and writing WAF filter rule expressions by hand. None of that is impossible, but it is not beginner-friendly, and one wrong rule can block real visitors instead of bad ones.

Ultimate Security handles the whole process from your WordPress dashboard. Here is exactly how each part works.
Connecting Cloudflare Turnstile To Stop WordPress Bot Spamming
The Turnstile settings page in the plugin starts with two fields: Site Key and Secret Key, both generated from your Cloudflare dashboard. Paste them in, click Verify & Save Keys, and the status label switches from “Not verified” to a green “Verified” badge.
From there, you control exactly which forms get protected:
- Default WordPress Forms: a master toggle for everything, plus individual switches for login, registration, password reset, and comments
- WooCommerce Forms: the same setup for login, registration, lost password, and checkout, if you run a store
A few extra settings round it out. You can pick a light or dark theme so the widget matches your site, choose a widget size, and decide whether the check should always show or only appear when something looks suspicious. There is also a whitelist option, so logged-in users, specific IP addresses, or specific browsers can skip the check entirely, which is useful for letting your own team move through forms without friction.
Connecting Cloudflare WAF To Stop WordPress Bot Attacks
The WAF side needs to reach into your Cloudflare account and push rules there, so start by switching on Enable WAF Rules inside the plugin, then give the connection a label under Account Name / Label so you can tell it apart from any other Cloudflare account you add later.
From there, pick one of three ways to connect:
- API Token: The most secure option, since it only grants the scoped permissions the plugin actually needs (
Zone > WAF > EditandZone > Zone > Read) instead of full account access. Generate it in Cloudflare under My Profile > API Tokens, paste it in, set a token duration, and click Verify & Save. - Email + Global API Key: Connects using your master Cloudflare credentials. It works, but a Global API Key grants full administrative access to your entire Cloudflare profile, so it is the least contained of the three options.
- OAuth: authenticates through a self-managed OAuth application in Cloudflare, without sharing your password or master key. This needs a Client ID and Client Secret from Manage Account > OAuth Clients in Cloudflare, plus the Access Token generated after authorization. Adding a Refresh Token is optional but recommended so the plugin can renew access automatically instead of asking you to reconnect once the token expires.
Whichever method you pick, click Verify & Save, then hit Save Changes when the unsaved changes bar appears at the top or bottom of the screen. Ultimate Security supports multiple Cloudflare accounts, so you can add more than one and switch between them later, which is useful if you manage several client sites.
Choosing and Deploying Your Rules
With the connection live, turn on the rule categories that matter most:
- Allow good bots (Google, Bing) so search crawling keeps working
- Block aggressive crawlers and sensitive WordPress paths
- Block traffic from data centers and TOR networks
- Challenge VPN traffic and large cloud providers on your login page
Save your settings, then open Preview & Deploy. This screen turns your toggles into the actual rule expressions Cloudflare will run, so you can review each one before anything goes live. Pick your Cloudflare zone and click Deploy Rules. If you ever need to start over, Remove Plugin Rules clears out only what the plugin created.

Worth repeating: Ultimate Security only manages the rules it builds. It will not touch anything you have already set up manually in Cloudflare, so layering this on top of an existing setup is safe.
Step-by-Step Guide Using Ultimate Security
In a nutshell, here are the steps to stop bot attacks for WordPress using Ultimate Security.
- Install and activate Ultimate Security from the WordPress plugin directory.
- Generate a Turnstile Site Key and Secret Key in your Cloudflare dashboard, then paste both into the plugin and click Verify & Save Keys.
- Turn on protection for your highest-risk forms first. Login and comments usually come first, then registration, password reset, and WooCommerce forms if you run a store.
- Open WAF Rules and switch on Enable WAF Rules.
- Generate an API Token in Cloudflare with Zone WAF Edit and Zone Read permissions, then paste it into the plugin and verify.
- Turn on the rule categories that fit your site, such as blocking hosting providers and TOR traffic or challenging VPN users on the login page.
- Go to Preview & Deploy, review the generated rules, select your Cloudflare zone, and click Deploy Rules.
Once step seven is done, your site has edge-level filtering through the WAF and form-level verification through Turnstile, both running in the background without a line of code written by hand.
Key Takeaways
- WordPress bot attacks target predictable, open entry points: login pages, forms, comments, and old features like XML-RPC
- Cloudflare WAF filters bad traffic at the edge, before it reaches your server
- Cloudflare Turnstile verifies real users directly on your forms
- Using both together covers the two main routes bots use to reach a WordPress site
- Ultimate Security connects and deploys from inside WordPress, with no manual rule writing
Frequently Asked Questions
What is the main cause of WordPress bot attacks?
Most bot attacks target open, predictable entry points like login pages, contact forms, comment sections, and older features like XML-RPC. Because WordPress sites share the same basic structure, a bot built for one site can attack thousands of others with almost no changes.
Can Cloudflare fully stop bot attacks on WordPress?
Cloudflare significantly reduces bot traffic when the WAF and Turnstile work together. The WAF filters traffic at the edge, and Turnstile verifies real users on your forms. No tool blocks every bot, but this combination covers the two main routes bots use to reach a WordPress site.
Is Cloudflare Turnstile better than a traditional CAPTCHA?
Turnstile runs quietly in the background for most visitors and only shows a check when something looks suspicious, which is less disruptive than older, click-based verification.
Will connecting Cloudflare WAF rules affect my existing Cloudflare settings?
No. Ultimate Security only manages the rules it creates and will not overwrite or delete anything already configured manually in your Cloudflare account.
Does stopping WordPress bot attacks slow down my site for real visitors?
No, not when set up correctly. Cloudflare’s WAF filters traffic at the edge before it reaches your server, and Turnstile runs invisibly for most visitors, only asking for extra verification when something looks suspicious. Real users rarely notice either one is active.
Conclusion
Cloudflare’s WAF and Turnstile cover the two main entry points bots rely on, one at the edge of your network and one right on your forms. Used together, they close far more gaps than either tool manages alone, and that combination is really what effective WordPress bot protection comes down to.
If configuring all of this inside Cloudflare directly sounds like more than you want to take on, Ultimate Security brings the entire process into your WordPress dashboard. Connect Turnstile, deploy your WAF rules, and protect WordPress from bots in a few clicks without being complicated.

Comments are moderated. Stay on topic: spam and link drops are removed.