- A security plugin runs inside WordPress, so it only acts after a request has reached PHP and loaded your site.
- A firewall in front of your site turns bad traffic away before it uses any of your server's resources.
- Out-of-date plugins are the most common way into a WordPress site, so regular updates beat any scanner.
- Backups you have restored before turn a breach into an inconvenience: you roll back instead of rebuilding.
- Keeping each site separate stops one hacked site spreading to others.
Why can't a WordPress security plugin stop an attack on its own?
Secure a WordPress site in layers, not with one plugin. Put a firewall in front of the site, give every account only the access it needs, keep WordPress, plugins and PHP up to date, keep tested backups, and run each site separately. A security plugin helps, but it acts last, after a request has already reached your site.
Plugins such as Wordfence and Sucuri are useful. They add login protection, malware scanning and filtering rules. The limit is where they run: inside WordPress. By the time the plugin looks at a request, your server has accepted it, started PHP and loaded WordPress. The work is done before the decision is made.
The plugin decides last
Under a flood of bad requests, the work of starting PHP for each one can use up your site's capacity and take it offline, even if the plugin blocks every single request.
What happens to a request before a security plugin sees it?
The order is fixed. Your server accepts the connection and hands it to PHP. PHP starts and loads WordPress. WordPress loads its plugins. Only then does your security plugin get a turn, and every step before it has already used processor time and memory.
So a plugin cannot be your outer wall. A request built to be expensive, such as a heavy search, an XML-RPC probe or a burst of login guesses, has already cost your server by the time the plugin says no. Blocking it then saves you from the exploit, not from the load. The cheap place to stop traffic is before PHP starts.
| Stage of the request | Already spent | Can a plugin act here? |
|---|---|---|
| Server accepts the connection | A connection slot | No |
| Request passed to PHP | Server capacity | No |
| PHP starts | A PHP process and memory | No |
| WordPress loads with its plugins | The full WordPress start-up | No |
| Security plugin checks the request | All of the above | Yes, but the cost is already paid |
A security plugin acts at the last stage, after the expensive work is done.
What does a firewall in front of WordPress stop?
A firewall in front of your site judges traffic before it reaches your server, so a blocked request costs your site nothing. It can turn away bots scanning for plugin holes, bots guessing passwords at the login form, and floods meant to exhaust your site.
On G7Cloud, every site sits behind ScaleShield, our firewall and bot protection, on every plan including Free. It challenges or blocks abusive automated traffic before it reaches your site, so your server's capacity goes on real visitors. For what to do when a flood arrives, see DDoS protection for WordPress.
How does least-privilege access reduce your attack surface?
Least privilege means every account, file and process gets only the access it needs. Most WordPress compromises spread through access that was too broad: a stolen editor login that can install plugins, a file that should be read-only, an admin account shared by three people. Tighter access does not stop the first mistake, but it limits how far it travels.
- Give every person their own account, so a leaked password points to one user you can disable.
- Turn on two-factor authentication (a code from your phone as well as the password) for admin logins.
- Choose roles with care: an editor should not be able to install plugins.
- Use SFTP rather than plain FTP, so passwords and files are encrypted in transit.
- Set file permissions so the web server cannot rewrite WordPress core files.
- Turn off the built-in file editor, which lets a stolen admin session change your code directly.
Add define('DISALLOW_FILE_EDIT', true); to wp-config.php. It removes the theme and plugin code editors from wp-admin, so a hijacked admin session cannot paste PHP into your theme.
On G7Cloud, every account can use two-factor authentication and file access is over SFTP. The Agency plan adds team roles (owner, admin, developer, editor, viewer), so colleagues and clients get only the access they need. File permissions are covered in Linux file permissions for WordPress.
Why do WordPress, plugin and PHP updates matter more than a scanner?
Because out-of-date plugins are the most common way into a WordPress site. Most breaches are not clever, targeted hacks. They are bots scanning huge numbers of sites for a known hole in an old plugin, then walking through it. A scanner tells you afterwards that you were breached. An update closes the door first.
The update gap is the breach window
When a plugin flaw is made public, bots often start scanning for it within hours. Every day you delay the update, your site is racing that automation.
Good updating has three parts. Keep WordPress, every plugin and every theme current, and delete plugins you no longer use, because a deactivated plugin can still be exploited. Keep PHP on a supported version, since old versions stop getting security fixes. And test updates on a copy before they reach your live site. On G7Cloud's Pro, Studio, Agency, Solo Plus and Solo HA plans, a preview copy for each pull request lets you check an update before visitors see it. The server itself needs the same care: see how to patch a Linux server safely.
How do tested backups turn a breach into an inconvenience?
Security also means recovering fast when something gets through. A good backup turns a breach into a rollback: you restore a clean copy from before the compromise, in minutes rather than days. But a backup you have never restored is a hope, not a safety net.
On G7Cloud, every site is backed up daily, and we keep 14 daily, 8 weekly and 12 monthly copies. Each night we restore a rotating sample of backups into a throwaway test copy to prove they work. You restore the files, the database or both from the dashboard. The backups page explains how it works, and our WordPress backup strategy guide helps you plan your own.
After a suspected compromise, do not just delete the bad file. Restore a clean backup from before the breach, then apply every pending update. Cleaning in place often misses a second backdoor.
Why does keeping sites separate stop one hack spreading?
On traditional shared hosting, hundreds of sites share one PHP setup and one file system, so a hacked site can read or infect its neighbours. Isolation closes that path: each site is walled off from every other.
On G7Cloud, every site runs in its own isolated container with its own database and its own files. A flaw in another customer's site stays in their container. A plugin can protect the inside of one site; only the platform can keep one site's problem from reaching another.
What is a sensible layered WordPress security checklist?
Stack controls so each one catches what the others miss. The table shows where each acts and what it cannot stop, which is why a plugin alone leaves gaps.
| Control | Where it acts | Stops | Cannot stop |
|---|---|---|---|
| Security plugin | Inside PHP, after start-up | Some known attacks once they arrive | The load of the requests; floods |
| Firewall in front | Before your site | Abusive bots and floods, before PHP | A valid login with a stolen password |
| Least access plus 2FA | Accounts and files | A stolen login spreading; unwanted code edits | The password being stolen |
| Updates | WordPress, plugins, PHP | Known flaws being exploited | A brand-new, unpublished flaw |
| Isolation | Platform | One hacked site infecting others | The first site being hacked |
| Tested backups | Recovery | A breach causing lasting damage | The breach itself |
Each control acts at a different point. Security is the whole stack.
The short version
Put a firewall in front, give each account the least access it needs with 2FA, keep everything updated, keep sites separate and keep tested backups. A security plugin then adds a useful inner layer. See how these layers fit together in our WordPress security overview.
Frequently asked questions
Do I still need a WordPress security plugin if my host has a firewall?
A plugin still adds a useful inner layer, such as login hardening and malware scanning. It should not be your only defence. A firewall in front of your site stops most attack traffic before it reaches PHP, which a plugin cannot do, so the two work best together.
Why can a plugin firewall not stop a DDoS attack?
A plugin firewall runs inside WordPress, so every request in a flood still starts PHP and loads WordPress before the plugin can block it. In a large flood, that work alone exhausts your site. Stopping a flood needs a firewall in front of the site that drops traffic before it reaches your server.
What is the single most important thing I can do to secure WordPress?
Keep WordPress, plugins, themes and PHP updated, and delete anything you no longer use. Out-of-date plugins are the most common way in, and most attacks are bots hunting for known holes.
How do backups help with security if they do not stop attacks?
Security includes recovery. A clean backup lets you roll a breached site back to before the compromise in minutes instead of rebuilding it. On G7Cloud every site is backed up daily, and each night we restore a rotating sample of backups into a test copy to prove they work.
Is shared hosting less secure than isolated hosting?
It carries more risk from your neighbours. On shared hosting many sites use one PHP setup and file system, so a hacked site can spread to others. With isolation, each site runs in its own container with its own database, so one hacked site stays one hacked site.
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 →