Itnetic logo Itnetic Technologies
PlatformLogsNetworkPricing
Log inStart free
PlatformLogsNetworkPricing
Log inStart free

Learn · WordPress

How to protect WordPress from DDoS attacks.

A WordPress page costs you a database round trip and a PHP worker. It costs the attacker one HTTP request. That asymmetry — not bandwidth — is what takes WordPress sites offline.

Updated July 28, 2026 · Itnetic team — reviewed by Petr Chlíbek, founder

Key takeaways

  • WordPress sites fall over at request rates far below a "real" DDoS, because PHP workers run out long before bandwidth does.
  • Attackers do not need to study your site: xmlrpc.php, wp-login.php, wp-cron.php, admin-ajax.php and ?s= searches are in the same place on every install.
  • A security plugin cannot stop a flood — it only runs after a PHP worker has already been spent on the request it is about to block.
  • Full-page edge caching plus a challenge gate in front of the dynamic paths is the combination that actually holds; a 60-second TTL turns thousands of requests per second into one origin hit.

Why WordPress attracts DDoS attacks

WordPress powers a large share of the web, and that popularity is precisely the problem: an attacker never has to study your site. Every install has the same file layout, the same login URL, the same REST namespace and the same expensive endpoints. One script written against WordPress works against millions of targets, yours included.

The second reason is cost per request. A static file is read from memory and gone in well under a millisecond. An uncached WordPress page is a PHP worker plus a WordPress bootstrap plus theme and plugin code plus a handful of database queries — often 200–600 ms of work. The attacker spends one cheap HTTP request; you spend a thousand times more. That is the cost asymmetry behind every Layer 7 attack, and WordPress hands it to attackers by default.

The third reason is what actually runs out. Almost nobody's WordPress site dies of saturated bandwidth. It dies because the PHP-FPM worker pool — typically somewhere between 5 and 50 processes — is fully occupied, so every subsequent visitor queues behind a flood and eventually gets a 502 or 504. A few hundred requests per second against an uncacheable path is enough. You do not need a headline-grabbing attack to be taken offline; you need a bored person with a script.

The endpoints attackers actually hit

EndpointWhy it is a targetCheapest defense
/xmlrpc.phpPingback abuse and brute force — one request can carry many login attemptsBlock at the edge unless you genuinely use it
/wp-login.php, /wp-admin/Credential stuffing; never cacheable, and each hit boots WordPressRate limit plus challenge, restrict by country or IP
/wp-cron.phpFires scheduled jobs on demand — an attacker can run your cron thousands of times a secondDisable WP-Cron, run it from system cron
/?s=…Full-text search: database-heavy, uncacheable, and infinitely variableRate limit, short cache TTL, reject junk queries
/wp-admin/admin-ajax.phpThe catch-all endpoint every plugin uses; always PHP, often unauthenticatedPer-client rate limit
/wp-json/wp/v2/users, /?author=1User enumeration that feeds the brute-force listRestrict or disable if you do not publish author data
/?anything=randomCache-busting query strings crafted so every request misses cacheIgnore unknown query args in the cache key
/cart, /checkout, ?add-to-cart=WooCommerce paths are uncacheable by definition and write to the databaseRate limit, keep the origin unreachable

Why a security plugin cannot stop a DDoS attack

A WordPress security plugin lives inside the thing being attacked. Walk the request path: the flood reaches your server, your web server accepts the connection, a PHP-FPM worker picks it up, WordPress bootstraps, plugins load — and only then does the plugin decide to block. You have already spent the exact resource the attacker is trying to exhaust. At a few thousand requests per second, "block the request" and "serve the request" cost you nearly the same thing.

This is not a criticism of plugins; it is a description of where they sit. Login lockouts, malware scanning, file integrity checks and 2FA are genuinely valuable, and none of them are volume defenses. The same reasoning applies, less severely, to .htaccess rules and server-level firewalls: blocking in nginx is far cheaper than blocking in PHP, but it is still your uplink, your CPU and your connection table absorbing the attack.

Mitigation has to happen before the request reaches PHP — and ideally before it reaches your server at all. That is the whole argument for filtering at the edge, covered in what DDoS mitigation is.

Step 1 — Close the amplifiers WordPress ships with

  • XML-RPC. Unless you rely on it for remote publishing or a plugin that still needs it, block /xmlrpc.php outright. It accepts many authentication attempts in a single request, which makes it the most efficient brute-force surface on the platform.
  • WP-Cron. By default WordPress checks its schedule on page loads, so an attack becomes a way to run your cron jobs continuously. Set define('DISABLE_WP_CRON', true); in wp-config.php and invoke wp-cron.php from a real system cron every few minutes instead.
  • Pingbacks and trackbacks. Turn them off in Settings → Discussion. They exist to let other servers make your server do work.
  • Author enumeration. If your site does not publish author archives, block ?author= redirects and the wp-json/wp/v2/users route. Enumeration is the reconnaissance step that makes the subsequent credential attack efficient.
  • Unused REST routes. A headless or lightly used REST API should be reachable only where you actually need it.

The official WordPress hardening guide covers the rest of the baseline — updates, file permissions, least-privilege database users. None of it stops a flood, and all of it should be true anyway.

Step 2 — Make the common case free

Full-page caching at the edge is the single most effective DDoS defense available to a WordPress site, because it removes PHP from the request path entirely for anonymous visitors.

  • Cache HTML for anonymous traffic, and bypass the cache when a wordpress_logged_in_ cookie or a WooCommerce cart cookie is present. Logged-in users get dynamic pages; the flood does not.
  • Ignore unknown query strings in the cache key, so ?utm_source=… and ?x=8462 resolve to the same cached object. Otherwise cache-busting parameters walk straight past your cache and into PHP.
  • Serve stale content on origin error (stale-while-revalidate, stale-if-error). If your origin does buckle, visitors keep seeing the site instead of a 502.
  • Cache static assets aggressively with long TTLs and fingerprinted filenames.

The arithmetic is worth stating plainly: with a 60-second edge TTL, a flood of 5,000 requests per second against your homepage produces one origin request per minute. Everything else is served from the edge, which is why a CDN is attack armor and not just a speed tool.

Step 3 — Put a gate in front of login and admin

wp-login.php cannot be cached, is targeted constantly, and boots the full stack on every hit. Give it its own treatment: a strict per-client rate limit, a challenge for anonymous clients, and — if your team logs in from known places — a country or IP restriction on /wp-admin/. Add 2FA and stop using an account named admin. Credential stuffing and a Layer 7 flood are the same traffic pattern with different goals, and the same gate handles both.

Step 4 — Bound the expensive dynamic paths

Search, AJAX and commerce endpoints are where a small request volume buys a large amount of database work.

  • Rate-limit /?s= per client and cache successful searches briefly; reject empty and absurdly long queries outright.
  • Rate-limit admin-ajax.php, which is where plugin code you did not write ends up doing unbounded work.
  • On WooCommerce, protect ?add-to-cart=, /cart and /checkout with per-client limits rather than caching — they must stay dynamic, so bound them instead.
  • Keep an object cache (Redis or Memcached) in front of the database so repeated queries stop being repeated work.

Step 5 — Make sure the edge cannot be bypassed

None of this matters if your server's real IP address is still reachable. Attackers pull DNS history, check certificate transparency logs and probe unproxied subdomains such as mail. or cpanel., then send the flood straight past your filtering layer. Firewall the origin so it accepts HTTP only from your mitigation network. The full checklist is in how to hide your origin IP address.

Step 6 — Size the origin for what still gets through

Set PHP-FPM max_children to what your RAM can actually support rather than an optimistic number, so overload degrades instead of swapping to death. Put a modest limit_req in nginx as a backstop. Cap slow query time. These will not survive an attack on their own — they decide whether the fraction that reaches you causes a slowdown or a crash.

If you are reading this because your site is down right now, work through how to stop a DDoS attack first and come back to the hardening afterwards.

How Itnetic protects WordPress sites

Itnetic sits in front of WordPress as a reverse proxy you enable with two DNS records — no plugin to install, no server changes, and nothing to maintain inside WordPress where an attacker's requests would already have cost you a worker.

Anonymous traffic meets an invisible challenge gate at the edge: real browsers pass without a CAPTCHA, and the scripted floods aimed at wp-login.php and xmlrpc.php never reach your PHP pool. Behavioral signatures and IP reputation filtering catch the clients that fake a browser user agent, while WAF rules let you allow, block or challenge by path, method, country or client fingerprint — which is how you lock /wp-admin/ to your own country in about a minute. Edge caching serves anonymous pages without touching your origin, and rate limits bound the paths that must stay dynamic: search, admin-ajax.php, cart and checkout. If you run WordPress headless, the wp-json routes can be marked as an API zone so machine clients get 429s instead of a challenge page they cannot solve.

Every verdict lands in per-request logs and analytics, so after an incident you can show exactly what was blocked and why. Attack traffic is never metered against your bandwidth quota — being attacked should not produce an invoice — and DDoS protection is included on every plan, including the free one.

Itnetic's DDoS protection goes live in about five minutes. If you want the background first, start with what DDoS mitigation is.

FAQ

Quick answers

Can a WordPress security plugin stop a DDoS attack?

No, and not because of plugin quality. A plugin only runs after your web server has accepted the connection and a PHP worker has bootstrapped WordPress — so blocking a request costs you almost as much as serving it. Plugins are valuable for login lockouts, 2FA and malware scanning; volume has to be filtered upstream, before it reaches PHP.

How much traffic does it take to take a WordPress site down?

Far less than most people expect. Bandwidth is rarely the limit — the PHP-FPM worker pool is, and it is usually between 5 and 50 processes. A few hundred requests per second against an uncacheable path such as /?s= or wp-login.php can saturate it, after which real visitors queue and receive 502 or 504 errors.

Should I disable xmlrpc.php?

Yes, unless you actively use remote publishing or a plugin that still depends on it. XML-RPC accepts multiple authentication attempts inside a single request, which makes it the most efficient brute-force and flood surface WordPress exposes. Block it at the edge rather than inside WordPress, so blocked requests cost you nothing.

Will edge caching break logged-in users or my WooCommerce cart?

Not if the cache is configured correctly. Bypass the cache whenever a wordpress_logged_in_ or WooCommerce cart cookie is present, so editors and shoppers always get dynamic pages while anonymous visitors are served from the edge. Cart, checkout and account pages stay uncached by design and are protected with rate limits instead.

Does DDoS protection slow WordPress down?

The opposite, when protection and caching sit on the same edge network. Cached pages are served from the point of presence nearest the visitor instead of your origin, so typical page loads get faster; the challenge gate applies to anonymous traffic and is invisible to real browsers.

Do I need to change my hosting to protect WordPress?

No. DNS-based protection works with any host — shared hosting, a VPS or managed WordPress. You point your A/AAAA or CNAME records at the mitigation network, and it becomes the public front door for your site. The one server-side change worth making is firewalling the origin so it accepts traffic only from that network.

Keep reading

01

What is a DDoS attack?

A distributed denial-of-service (DDoS) attack overwhelms a website or API with traffic from many machines at once, until real visitors can no longer get through.

02

What is a Layer 7 DDoS attack?

Layer 7 (application-layer) DDoS attacks imitate legitimate visitors instead of flooding the network — which is exactly why traditional defenses miss them.

03

How to stop a DDoS attack on your website.

A practical, ordered checklist for the moment your site goes down — and for making sure the next attack never reaches it.

04

What is DDoS mitigation?

DDoS mitigation is the process of spotting attack traffic and dropping it before it reaches the resource an attacker is trying to exhaust — bandwidth, connections, or your application itself.

05

How to protect an API from DDoS attacks.

Browser challenges are useless against machine traffic — and fatal to it. Protecting an API means identifying clients and bounding what each one can cost you.

06

How to hide your origin IP address.

DDoS mitigation only works if your server cannot be reached any other way. An exposed origin IP is the most common reason protection is in place and the site still goes down.

07

What is a CDN?

A content delivery network (CDN) stores copies of your website on servers around the world, so every visitor is served from the location nearest to them.

Protect my website freeHow our protection works
Itnetic logo Itnetic Technologies

Advanced DDoS mitigation and web performance solutions for modern businesses. Protect your infrastructure across multiple regions.

Product

  • DDoS Mitigation
  • Web CDN
  • Network
  • Pricing

Resources

  • Learn
  • Changelog
  • FAQ
  • Status

Company

  • Founder
  • Contact
Petr ChlíbekIČO: 21210756Neplátce DPH
© 2026 Itnetic Technologies. All rights reserved.
Terms of ServicePrivacy PolicyCookie PolicyDPA

We use essential cookies to run and secure the site. With your consent we also use Umami analytics (self-hosted, no cross-site tracking) to understand usage. Cookie Policy