- A DDoS attack floods your site with junk traffic from many machines at once, so visitors cannot get through.
- WordPress is an easy target because every uncached page runs PHP and queries the database, so even a modest flood can exhaust the server.
- Network-level (layer 3/4) attacks aim at bandwidth; application-level (layer 7) attacks look like normal page loads and are harder to spot.
- A plugin cannot stop a DDoS, because it only runs after the request has reached your server and started PHP. Filtering has to happen in front of the site.
- ScaleShield sits in front of every G7Cloud site, on every plan including Free, and challenges or blocks abusive automated traffic before it reaches your site.
What is a DDoS attack, in plain terms?
A DDoS attack floods your website with so many junk requests, from so many machines at once, that visitors cannot get through. DDoS stands for Distributed Denial of Service. Distributed means the traffic comes from thousands of scattered devices, so you cannot block one address and be done.
The aim is not to break in or steal data. It is to keep your site busy answering nonsense until it has nothing left for customers. A shop that will not load loses sales just as a hacked one does, which is why staying online is a security concern.
DDoS is about exhaustion, not intrusion
A DDoS attack does not need a bug in your code. It wins by making your server spend all its processor time, memory and bandwidth on fake traffic. That is why a fully patched WordPress site can still be knocked offline.
Why is WordPress an easy target for DDoS attacks?
Because every uncached page request runs PHP and queries the database. Sending a static file is cheap. Building a WordPress page means loading the core, running every active plugin and asking the database for content. A flood of uncached requests forces that work over and over until the server runs out.
According to W3Techs' long-running survey, which makes WordPress a predictable target for automated attack tools.
Popularity is the other half. Attackers already know the addresses every WordPress site shares, such as wp-login.php, xmlrpc.php and wp-admin, so they point ready-made tools at them without studying your site.
xmlrpc.php deserves a mention. It lets apps talk to WordPress and accepts several actions bundled into one request, so one request can create far more work than usual. Attackers use it to multiply their load. Most sites do not need it.
Caching helps, but only for pages that can be cached
A page cache lets your site answer many requests without running PHP, which absorbs a lot of casual load. But the login page, cart, checkout and admin cannot be cached, so an attacker aiming at those reaches PHP every time.
What is the difference between layer 3/4 and layer 7 attacks?
The numbers come from the standard model of how networks are layered. Layers 3 and 4 move data between addresses: the plumbing. Layer 7 is where your website lives: the requests that ask for pages. So a layer 3/4 attack aims at network capacity, and a layer 7 attack aims at your site itself.
A layer 3/4 attack, often called a volumetric flood, tries to push more data down the line than it can carry. Think of a motorway jammed with empty cars: no single car is a problem, but together they stop anyone moving. These floods are large and blunt, and are handled by a network big enough to absorb them.
A layer 7 attack is quieter. Each request looks like a visitor loading a page, so you cannot block it by its shape. The attacker simply sends far more than any audience would, and picks the expensive pages on purpose: search results, filtered product lists, the login form. WordPress feels this kind most, because every request lands on PHP and the database.
| Layer 3/4 (volumetric) | Layer 7 (application) | |
|---|---|---|
| What it targets | Network bandwidth and connections | Your website's pages |
| What it looks like | A wall of raw data | Requests that look like normal page loads |
| Why it hurts WordPress | Fills the connection to the server | Makes PHP and the database work on every hit |
| How it is stopped | Absorbed by a large filtering network | Bot detection and rate limits in front of the site |
Two attack shapes, two defences. Both live in front of the site, not inside WordPress.
Why can't a WordPress plugin stop a DDoS attack?
Because a plugin only runs after the request has reached your server and loaded WordPress. By the time a security plugin decides to block a request, PHP has started and the server has already spent what the attacker wanted it to spend. The request is refused, but the cost is paid.
Blocking after the fact still uses your resources
A plugin that refuses a bad request has still started PHP and run its own code to decide. Multiply that by thousands of requests a second and the plugin becomes part of the load.
Think of a plugin as a guard inside the building, checking each person at the front desk. That works for a trickle of visitors. When tens of thousands push through the door at once, the lobby fills regardless. The defence that works is at the gate: traffic is checked before it reaches your site, junk is dropped and only clean requests pass. Plugins still help with login limits and hardening, but they are not a DDoS defence.
What should I do while my WordPress site is under attack?
Stay calm, confirm it is an attack, and rely on the filtering in front of your site rather than fighting from inside WordPress. Hasty edits under load often make things worse.
A genuine surge, from a newsletter or a popular post, usually comes from many sources behaving normally, from places your audience lives. An attack tends to hit the same few addresses over and over, comes from unusual places, or arrives at rates no human audience would produce. Your access logs and uptime alerts show this quickly.
A checklist for the first ten minutes
Confirm it is an attack from your logs and alerts. Note which URLs are being hit. Make sure page caching is on. Turn off xmlrpc.php if you do not use it. Rate-limit or lock down wp-login.php. Contact your host so their filtering can be tuned. Do not start editing plugins or theme code under load.
On G7Cloud, the filtering is already running in front of your site, and uptime checks every minute alert you, and us, the moment the site stops answering.
How does ScaleShield filter attack traffic before it reaches your site?
ScaleShield is our firewall and bot protection. It sits in front of every G7Cloud site and checks each request before it reaches your site. It challenges or blocks abusive automated traffic there, so those requests never use the processor time, memory and database capacity your visitors need.
It is on every plan, including Free, together with free SSL certificates (wildcard included). Behind it, each site runs in its own container with its own database, so one site's load cannot spill into another's. Read more on the ScaleShield firewall and bot protection page, and see uptime monitoring for how per-minute checks alert you.
How do I harden a WordPress site against DDoS?
Reduce how much work each request can trigger, and choose hosting that filters traffic before it reaches you. Changes inside WordPress cannot absorb a flood on their own, but they shrink what an attacker can hit and make the filtering in front more effective.
| Step | Why it helps |
|---|---|
| Turn on full-page caching | Cached pages are served without running PHP, so casual load never reaches the database. |
| Turn off xmlrpc.php if unused | Removes an address attackers use to multiply the work each request creates. |
| Limit and protect wp-login.php | Slows bots guessing passwords and hammering the login page. |
| Keep WordPress, plugins and themes updated | Closes known holes, so a flood cannot be combined with a break-in. |
| Use strong passwords and 2FA | Stops a login flood turning into an account takeover. |
| Remove unused plugins and themes | Less code per request means less work an attacker can force. |
| Host where filtering happens in front of the site | The biggest factor: bad traffic is dropped before it reaches your server. |
Hardening steps in rough order of impact. The last matters most.
Hardening buys you margin, not immunity. A lean site with caching on and xmlrpc.php off will cope with small floods that would topple a bloated one. A determined attack still needs to meet filtering before your server, and resources of your own that a neighbour cannot use up. WordPress security beyond plugins covers the wider picture, and how our WordPress hosting works shows how filtering and isolation fit together.
Frequently asked questions
Can a DDoS attack hack my WordPress site?
No. A DDoS attack tries to make your site unavailable by flooding it with traffic, not to break in or steal data. Attackers sometimes use a flood as a distraction while they look for a separate weakness, so keep WordPress and plugins updated while dealing with one.
Will a WordPress security plugin stop a DDoS attack?
No. A plugin only runs after a request has reached your server and started PHP, so the resources the attacker wanted to use are already spent. Plugins help with login limits and hardening, but DDoS filtering has to happen in front of your site, before the request reaches your server.
Does G7Cloud protect every plan against DDoS, including Free?
ScaleShield, our firewall and bot protection, sits in front of every site on every plan, including Free. It challenges or blocks abusive automated traffic before it reaches your site, with nothing extra to buy. Free SSL certificates are included on every plan too.
How do I know if my WordPress site is under a DDoS attack or just busy?
A genuine surge usually comes from many sources behaving normally, from places that match your audience. An attack tends to hit the same few addresses, comes from unusual places, or arrives at rates no human audience would produce. Your access logs and uptime alerts show the difference quickly.
Should I disable xmlrpc.php to protect against DDoS?
Usually yes, if you do not use it. xmlrpc.php lets one request trigger several WordPress actions, which attackers use to multiply their load. Most sites no longer need it, because apps and services now use the REST API instead.
About G7Cloud Engineering
Articles written by the engineers who build and run G7Cloud: UK managed hosting and the AI Website Builder. We write about what we operate every day: containers, backups, databases, and the small-business websites that run on them.
More about G7Cloud →