It’s not “if”. It’s “constantly, right now, automatically”.
Let me correct a mental model that gets small and mid-sized retailers hurt. The picture in most people’s heads is a hacker — a person — deciding to target your shop. That’s not how it works, and believing it is why so many stores are soft.
The reality is that your site is being attacked continuously, by machines, alongside every other site on the internet. Botnets scan the entire IPv4 space looking for known-vulnerable software, exposed login pages, unpatched plugins and misconfigured servers. They don’t know or care what you sell. Your store is a row in a list, and the moment a scanner matches your version of something against a published exploit, you’re in a queue for automated compromise. Check your server logs for a day and you’ll see it: hundreds of hits on /wp-login.php, probes for /wp-config.php.bak, requests for admin panels of software you don’t even run.
I say this as someone who built and owns a store carrying around 20,000 SKUs — radio-controlled.co.uk. It gets probed around the clock, and the reason it stays up isn’t luck or obscurity, it’s that the defences are automated and layered so a single failure doesn’t become a breach. Everything below is what I’d tell anyone running a shop that takes real money.
It’s in two parts: general site security first, then payment and chargeback security — a discipline of its own, and the place where the losses tend to be most direct. Jump to any section from the contents.
Contents
Part 1 — General site security
- Patch relentlessly — the outdated plugin is the attack
- Lock down admin access like it’s the vault
- Close open registration — accounts at checkout only
- Put a WAF and CDN in front of your origin
- Block the countries you don’t serve
- Keep backups you have actually restored
- Least privilege everywhere, secrets nowhere public
- Encrypt everything in transit and set your security headers
- Monitor, log and alert
- Have an incident response plan
Part 2 — Payment and chargeback security
- Secure the payment path
- Enforce 3-D Secure — and shut down checkout fraud
- Have a chargeback response script
Part 1 — General site security
1. Patch relentlessly — the outdated plugin is the attack
The overwhelming majority of ecommerce compromises are not clever zero-days. They’re known vulnerabilities in software that was never updated. A plugin ships a security fix, the fix is published, the exploit becomes public, and every unpatched install running the old version is now a documented target with a working recipe attached.
- Keep the platform, theme and every plugin/extension current. On WooCommerce, Magento, Shopify apps — same principle.
- Test updates on staging first, then apply promptly. “Promptly” means days, not “next quarter”.
- Delete every plugin and theme you don’t use. Deactivated is not deleted — dormant code is still on disk and still exploitable. Your attack surface is the sum of everything installed, not everything switched on.
- Subscribe to the security advisories for your stack so you hear about a critical fix before the scanners do.
Reducing what’s installed is the single highest-leverage thing most stores can do. Every plugin is a supplier you’ve silently trusted with your customers’ data.
2. Lock down admin access like it’s the vault (it is)
Your admin login is the front door to everything — orders, customers, payment config, the ability to inject code site-wide. Treat it accordingly.
- Multi-factor authentication on every admin account. No exceptions. A stolen or guessed password should not be sufficient to log in. This one control defeats the entire category of credential-stuffing and brute-force attacks.
- No shared accounts. One human, one account, so actions are attributable and you can revoke one person without changing everyone’s password.
- Least privilege. The person who writes blog posts does not need administrator rights. Give shop managers “shop manager”, authors “author”. A compromised low-privilege account is a containable problem.
- Rate-limit and obscure the login. Limit failed attempts, and don’t leave the default login URL wide open to unlimited guesses. Strong, unique, password-manager-generated credentials throughout — never reused from another service.
- Scope API keys and app passwords. A read-only key can’t be used to write. Rotate them, and revoke any you’re not actively using.
Best of all: take the admin login off the public internet entirely. MFA protects the door; this removes the door from view. Because my origin only accepts traffic from Cloudflare (see Put a WAF and CDN in front of your origin, below), I can add a Cloudflare firewall rule that blocks all access to the admin paths — /wp-admin, /wp-login.php and friends — unless the request carries a secret header that I set on my own machine. To me the admin panel behaves completely normally; to everyone and every bot on the internet, it simply doesn’t exist. Requests without the header are dropped at the edge before they ever reach the application.
The proof that this works is in my logs: that one rule silently blocks 100–200 automated admin-login attempts every single day. Those bots never touch WordPress at all — which means that even if the platform shipped a login vulnerability tomorrow, the attackers hammering that page couldn’t reach the code to exploit it. You’ve turned a permanently-exposed, permanently-probed surface into one that isn’t there. If you happen to have a static IP you can allowlist that instead; most of us don’t, and a secret header (or a full Zero Trust layer like Cloudflare Access, with real authentication in front of the panel) gives you the same protection from anywhere. Pair it with MFA — this is defence in depth, not a replacement.
3. Close open registration — accounts at checkout only
An open “register” form is a public, unauthenticated endpoint that writes to your database — which makes it exactly the kind of surface automated abuse loves. Bots hammer it to create throwaway accounts by the thousand: to stage credential-stuffing and fraud, to spam, and to fish for any registration-flow bug that leaks data or escalates privilege. The overwhelming majority of those dummy accounts never intend to buy anything — they exist to probe you.
So don’t offer standalone registration at all. Allow account creation only during checkout — that is, only when someone is actually placing an order. In WooCommerce that’s Settings → Accounts & Privacy: untick “Allow customers to create an account on the ‘My account’ page,” leave “Allow customers to create an account during checkout” on, and under Settings → General make sure WordPress’s own “Anyone can register” (Membership) is switched off. Now the only route to an account runs through a genuine purchase — gated by payment and, if you’ve done Part 2, by 3-D Secure.
The effect is the same shape as taking the admin login off the public internet: you’ve removed a permanently-probed public endpoint that handed attackers a free foothold and gave the business nothing in return. Fewer doors, fewer problems.
4. Put a WAF and CDN in front of your origin
Do not expose your server directly to the internet. Sit a Cloudflare-style edge in front of it and you get, for little or no cost:
- A Web Application Firewall with managed rules that block common OWASP attack patterns (SQL injection, cross-site scripting) before they ever reach your application.
- DDoS absorption — the edge soaks up volumetric attacks that would otherwise flatten your origin.
- Bot management and rate limiting — throttle or challenge the automated traffic hammering your login and checkout.
- Origin hiding — lock your server’s firewall to only accept traffic from the CDN, so attackers can’t bypass the edge and hit the box directly. This is the foundation everything else at the edge stands on: it’s what makes the admin header-gate above airtight, because there’s no way around Cloudflare to reach the login page directly. (If your real origin IP is discoverable and your firewall still accepts direct connections, that protection leaks — worth checking, and it’s the first thing a serious attacker will probe for.)
This is genuinely one of the highest-value hours you can spend. My store runs behind exactly this, and the edge quietly discards the vast bulk of malicious traffic before the application has to think about it.
5. Block the countries you don’t serve
If you don’t sell or ship to a country, there’s very little upside to letting it reach your site — and usually a real cost. A large share of the traffic from regions you’ll never do business with isn’t customers at all: it’s bots, scrapers, vulnerability scanners and content crawlers. They probe for weaknesses, they hammer expensive uncached pages, and they burn server resources that should be serving the people who actually buy from you — quietly degrading performance for real customers.
RCUK is a concrete example. We don’t sell to China, yet we see a huge volume of traffic from there trying to crawl and scrape the site. It’s both a security risk — every one of those requests is a probe — and a performance and cost problem, because it’s server resource consumption we get precisely nothing back for. So we dead-end it at the edge.
In Cloudflare this is a two-minute job with a WAF custom rule: match where ip.geoip.country is in your no-serve list and set the action to Block (or a Managed Challenge if you’d rather be gentler and let the occasional real person through). Blocked requests are stopped at the edge and never reach your origin — so they cost you no server CPU, no database load and no bandwidth on the box itself. The junk simply hits a wall in Cloudflare’s network instead of yours.
A few sensible cautions:
- Block only what you’re sure about. Start with the handful of countries you genuinely never serve and where the junk traffic is worst; you can always widen the list later.
- Don’t shut out the crawlers you want. Googlebot and Bingbot mostly originate from regions you won’t be blocking, but if you geo-block a country you actually rank in or ship to, check you’re not turning away search engines or real customers who travel or use a VPN.
- It’s a blunt instrument, not a fraud filter. It slashes noise and load; it doesn’t replace the WAF, rate limiting or 3-D Secure. Use it alongside them.
Done sensibly, geo-blocking is one of the biggest single cuts in hostile traffic you can make — you’re simply declining to spend resources on visitors who were never going to be customers.
6. Keep backups you have actually restored
When — not if — something gets through, backups are the difference between an afternoon’s inconvenience and an extinction event. But a backup is only real if you’ve proven you can restore it.
- Automated, scheduled, off-site. A backup sitting on the same server that got compromised or ransomwared is worthless.
- Versioned and, ideally, immutable. If an attacker (or ransomware) can overwrite your backups, they aren’t backups. Keep enough history to roll back past the point of compromise, which you may not detect for days.
- Test the restore. Actually stand the site up from a backup on a spare environment. The worst possible time to discover your backups are corrupt or incomplete is mid-incident. A backup you’ve never restored is a hope, not a plan.
7. Least privilege everywhere, secrets nowhere public
The blast radius of any single compromise is decided by how much that one component could touch. Shrink it everywhere:
- The database user your app connects with should have only the permissions it needs — not root.
- File permissions should be as tight as the platform allows; the web server shouldn’t be able to write where it doesn’t need to.
- API keys and secrets stay out of your code repository. Committed credentials are one of the most common breach vectors going — scanners watch public repos for exactly this. Use environment variables or a secrets manager, and rotate anything that’s ever been exposed.
- Separate credentials for staging and production. Staging is routinely less locked-down and is a favourite way in — never let it share prod’s keys or, worse, its live payment config.
8. Encrypt everything in transit and set your security headers
Table stakes, but still frequently half-done:
- HTTPS everywhere, with a valid certificate and no mixed content. Redirect all HTTP to HTTPS.
- HSTS so browsers refuse to talk to your site unencrypted at all.
- Secure,
HttpOnly,SameSitecookies so session tokens can’t be trivially stolen via script or sent cross-site. - A baseline of security headers: Content-Security-Policy (which also does the heavy lifting against checkout skimming — see Part 2),
X-Frame-Options/ frame-ancestors to prevent clickjacking,X-Content-Type-Options: nosniff. These are cheap to add and close off whole classes of attack. Run your domain through a headers scanner and fix what’s red.
Adding them in Cloudflare (no origin changes needed). The neat part is you don’t have to touch your server or your app config for any of this — you can set the whole lot at the edge, in one place, applied to every response site-wide:
- HTTPS and HSTS have dedicated toggles under SSL/TLS → Edge Certificates: turn on Always Use HTTPS (forces the redirect) and HTTP Strict Transport Security (HSTS) (set a long
max-age,includeSubDomains, andpreloadonce you’re confident). ⚠️ HSTS is sticky — enable it only when you’re certain everything is served over HTTPS, because browsers will then refuse plain HTTP for the wholemax-ageand you can’t quickly take it back. - Everything else goes in Rules → Transform Rules → Modify Response Header → Create rule: match all incoming requests and Set static for each header —
X-Content-Type-Options: nosniff,X-Frame-Options: SAMEORIGIN,Referrer-Policy: strict-origin-when-cross-origin, aPermissions-Policy, and yourContent-Security-Policy. It applies at the edge in seconds, no deploy required. - Roll out Content-Security-Policy carefully — it’s the most powerful header here (your main defence against the Part 2 skimming attacks) and the easiest to break your own site with. Deploy it first as
Content-Security-Policy-Report-Only, watch what it would have blocked, add the legitimate scripts to your allowlist, then switch to the enforcing header once it’s clean. - Need it dynamic — per-request CSP nonces, conditional logic? A Cloudflare Worker or Snippet can set response headers in code: same edge layer, full control.
Because it all lives at the edge, you can add, tighten or roll back any header in seconds without touching the origin — and it protects every response regardless of what your app or plugins are doing.
9. Monitor, log and alert — you can’t respond to what you can’t see
Most breaches aren’t loud. Attackers get in quietly and stay quiet, siphoning data or skimming cards for weeks. Detection is what shortens that window from months to minutes.
- File integrity monitoring — get alerted when core files change unexpectedly, which is how you catch an injected skimmer or backdoor.
- Alert on the high-signal events: a new admin user created, a plugin installed, a surge in 404s or failed logins, an unfamiliar script on checkout, a traffic pattern that doesn’t fit.
- Keep and actually review logs. The edge, the server and the application all have them. This is the same discipline as good analytics observability — you need reliable, trustworthy signal to act on, and security monitoring is that principle pointed at threats instead of conversions.
The goal is simple: be the one who tells you there’s a problem, before a customer’s bank does.
10. Have an incident response plan written down before you need it
The middle of a live compromise is the worst possible moment to be improvising. Write the plan while everything is calm:
- Who does what, and how to reach them out of hours.
- How to take the site offline or into maintenance mode fast, to stop ongoing damage.
- The recovery runbook: rotate all credentials and keys, identify and close the entry point, restore from a known-clean backup, patch the hole, then bring it back.
- Your legal obligations. If customer personal data is exposed, UK/EU GDPR generally requires notifying the ICO within 72 hours, and affected customers where the risk is high. Know this in advance — the clock is short and the fines for handling it badly are not. (Data-protection diligence you should be doing anyway; see the consent and lawful-basis notes here.)
- A post-incident review. What got in, why, and what change stops it recurring. Every incident should make you permanently harder.
Payment disputes are a category of incident all their own — deadline-bound, and easy to lose by reacting wrongly. That one earns its own playbook: see Have a chargeback response script in Part 2.
Harden yourself, not just the site
Every measure above protects the site. But the softest target in the whole operation might be you, sitting at your own laptop — and no amount of server hardening covers that.
Here’s the uncomfortable social reality: the moment you own a company, people assume you’re loaded. Attackers, opportunists, and occasionally even customers see “director” or “founder” and mentally add a zero. That makes you a deliberately chosen target for phishing, social engineering, SIM-swaps and device compromise — not a random one. And your personal computer is the machine holding the keys to everything: the admin panel, the payment dashboards, the business email, the domain registrar. Compromise you, and an attacker doesn’t need to beat any of the defences above — they just log in as you.
So treat your own machine with the same seriousness as the server:
- Keep it patched, full-disk encrypted, and locked when you step away. It is production infrastructure, because it holds the credentials to production.
- MFA on everything, via an authenticator app or hardware key — not SMS, which SIM-swap attacks are designed to defeat.
- Assume every email or message asking you to log in or pay is hostile until proven otherwise. The phishing aimed specifically at owners is far better crafted than the spray-and-pray that hits everyone else.
And then there’s the one almost nobody thinks about: browser extensions.
Be extremely wary of the plugins you install in your browser. An extension typically has permission to read and change everything on every page you visit — which includes your WooCommerce admin, your Stripe dashboard, your webmail and your bank. A malicious or compromised extension doesn’t need to breach your server at all; it reads your logged-in session straight out of the browser you’re already using. And this is a live supply-chain threat, not a hypothetical: popular, legitimate extensions get quietly sold to new owners or hijacked, then push a malicious auto-update to their whole existing install base. The safe-looking tool you added two years ago can turn hostile overnight, silently, using permissions you’ve long forgotten you granted. Audit what’s installed, remove everything you don’t actively need, and never run an extension you can’t vouch for on the machine you run the business from.
Here’s where the ground has genuinely shifted — and it’s very much the Conversion Works way of thinking: you can now write your own. For a lot of small utilities — a browser extension that does one specific job, a site snippet, an internal tool — you can build it yourself with AI in an afternoon, read every line it contains, and grant it exactly the permissions it needs and nothing more.
That isn’t automatically secure — you can write a bug as well as anyone can — but it removes the two things that make third-party plugins genuinely dangerous: you’re no longer trusting opaque code you’ve never read, and there’s no hidden auto-update channel through which it can be turned against you later. You know precisely what it does, because you made it do exactly that and nothing else. For anything that touches the machine holding your keys, knowable and minimal beats popular and convenient every time. It’s the same instinct that says write your own logic rather than bolt a black-box third-party tag onto your site — pointed at your own desk instead of your storefront.
Part 2 — Payment and chargeback security
This is where the money physically moves, and where the losses are most direct. It’s worth treating as its own discipline — the threats, the controls and the recovery paths are different from general site security, and getting them right is the difference between absorbing fraud and shrugging it off.
1. Secure the payment path — this is where the money and the liability live
Card data is radioactive: enormously valuable to attackers, enormously expensive to you if it leaks. The overriding rule is never let raw card details touch your server.
- Use a tokenised payment gateway (Stripe, PayPal, Adyen) where the card is entered into the provider’s iframe/element and your server only ever sees a token. This keeps you in the lightest PCI DSS scope (SAQ-A) and means a compromise of your site doesn’t expose card numbers you never held.
- Understand the modern ecommerce-specific threat: Magecart / digital skimming. Attackers inject malicious JavaScript into your checkout — often via a compromised third-party script or plugin — that quietly copies card details as customers type, before the gateway tokenises them. It’s invisible to the shopper and often to you.
- Defend against it with a Content Security Policy that whitelists exactly which scripts may run on checkout, Subresource Integrity on third-party scripts so a tampered file won’t load, and monitoring for any unexpected script appearing on your payment pages. Fewer third-party scripts on checkout is safer — every one is a potential injection point.
If you take one thing from the payment side, make it this: minimise what you handle, whitelist what runs on checkout, and watch that page like a hawk.
2. Enforce 3-D Secure — and shut down checkout fraud
Ecommerce attracts automated abuse aimed squarely at the transaction:
- Card testing / carding: attackers use your checkout to validate stolen card numbers with tiny purchases, generating a flood of failed authorisations (and gateway fees, and chargeback risk).
- Credential stuffing / account takeover: they replay username-password pairs leaked from other breaches against your login, betting on reuse.
- Fake account and fake order spam that pollutes your data and can mask fraud.
Counter them with velocity and verification, not blanket friction: rate-limit checkout and login attempts, use address verification, and alert on anomalies — a sudden spike in failed payments is a card-testing attack in progress, and you want to know within minutes.
But the single most important control here — for your bottom line — is enforcing 3-D Secure. This one deserves its own paragraph. Stripe (and every serious WooCommerce Stripe plugin) lets you force 3DS on payments, either through the API (request_three_d_secure: 'any') or a “require 3DS” setting in the plugin. It makes the shopper authenticate the payment directly with their bank — an app approval or a one-time code. On genuinely low-value items that extra step is mildly annoying and can cost you a little conversion; on anything of real value it is essential, because 3DS does something no fraud filter can: it shifts the liability for a fraudulent chargeback away from you and onto the card issuer. When the bank authenticates a transaction that later turns out to be a stolen card, the bank absorbs the loss, not your business. You did everything you were asked to do — you’re covered.
The cost of not doing this is not theoretical. RCUK lost around £3,000 to chargebacks in a single year from “customers” paying with stolen cards — all before this change was made. And what makes it so dangerous is the pattern: the attacks arrive in bursts, and you usually don’t realise until it’s already too late, when the disputes are landing days later and the goods are long gone. Forcing 3DS closes that hole almost entirely — fraudulent orders either fail authentication outright or become the bank’s problem rather than yours. (Worth knowing: modern 3DS2 passes invisibly for most low-risk, recognised transactions, so the friction actually hits far fewer real customers than you’d fear — while still handing you the liability shift.)
Clean bot filtering also protects your analytics: the same automated noise that probes your checkout corrupts the event data you make decisions on.
3. Have a chargeback response script
Fraud that slips past 3DS, and disputes that were never really fraud at all, both end up in the same place: the chargeback process. Here’s the trap most retailers walk into — how you respond to a chargeback determines whether you win it, and taking the wrong action can lose you a case you should have won. Refund reflexively and you can forfeit your right to contest while the goods are already gone; ignore it and you lose by default when the deadline passes. There’s a correct move for each situation, and the moment a dispute lands with a short clock ticking on it is not the time to be working it out from scratch.
So write a chargeback response script — a documented playbook — before you need it. For each dispute reason, spell out exactly what you do and what evidence you submit:
- “Item not received” (the classic). This is where tracked, signed-for delivery earns its keep. Your response is proof of delivery — carrier tracking, delivery confirmation, ideally a signature, and the delivery address matching the billing/AVS record. Without tracking you often simply can’t win this one, which is itself the argument for tracked shipping on anything above a sensible threshold.
- “Unauthorised / fraudulent.” If you enforced 3-D Secure (above), this is exactly where it pays off: cite the authentication and the liability shift — the issuer, not you, owns an authenticated transaction. Submit the 3DS result with your representment.
- “Not as described” / faulty. Photos, the product description as it was listed, your returns policy, and the full comms history.
A few hard-won principles to bake in:
- Respond within the deadline, every time. Card schemes give you a short, fixed window to submit evidence (representment). Miss it and the chargeback is lost automatically, no matter how strong your case was.
- Don’t just refund to make it go away once a chargeback is raised — that can mean losing the goods and the money, and may waive your right to fight it. Decide deliberately, per the script.
- Keep the evidence trail by default. Order records, delivery proof, AVS and 3DS results, and customer messages, retained on every order, are what make a fast, winnable response possible at all.
Know when to offer a return label — and do it on your terms. One of the most effective moves in a dispute response is to restate your returns policy and offer a concrete resolution: you can’t accept used goods back, but if the item is unused you’ll happily take it back and send a prepaid return label. This works on two fronts at once. First, the card issuer loves to see it — it demonstrates you’re acting in good faith and actively trying to resolve the complaint, which materially strengthens your side of the representment. Second, it calls the opportunist’s bluff: the dodgy “customer” almost never actually returns the item — they have it and they want to keep it — so the label goes unused and you’re not out of pocket, because a prepaid label only costs you anything if it’s actually used. You look eminently reasonable to the bank and you reclaim the postage you’d otherwise have eaten. Genuine customers, meanwhile, get a clean, easy resolution — which is exactly what you want for them.
And the uncomfortable truth underneath all of this: the customer is not always acting in good faith. Most are genuine, and a real problem should be resolved directly and generously — a fast refund or replacement is cheaper and kinder than a dispute, for everyone. But there is a contingent who deliberately exploit rules that already tilt heavily in the cardholder’s favour — “friendly fraud”, or first-party fraud — and claiming an item never arrived when it did is the textbook example. A written response script is how you protect the business from that minority without treating the honest majority as suspects. Genuine issue: fix it, no friction. Opportunistic dispute: a calm, evidence-backed representment, filed on time.
The mindset that keeps you up
Security isn’t a product you buy once or a checkbox you tick at launch. It’s an operating posture: assume you’re a target, assume you’ll eventually be breached, and build so that no single failure is fatal. Layer the defences so the edge stops most of it, MFA stops most of the rest, least privilege contains what gets through, monitoring catches it fast, and tested backups mean you always have a way back. On the payment side, tokenise everything, force 3-D Secure, and have the chargeback script ready before the first dispute lands.
None of this is exotic or expensive. The stores that get seriously hurt almost never fell to genius attackers — they fell to an unpatched plugin, a reused admin password, a skimmer nobody was watching for, a backup that turned out not to work, or a burst of stolen-card orders with 3DS switched off. Close those, and you’ve beaten the automated tide that takes down everyone who didn’t.
You will get attacked. That part isn’t up to you. Whether it turns into a breach — or a loss — very much is.
Hardening a store is the same instinct that makes the rest of an ecommerce operation trustworthy: control what runs, watch what happens, and don’t let a silent failure compound. That’s the thinking behind everything at Conversion Works — from Conform, which enforces clean, governed event data at the edge, to Conversion Workers, which runs logic in front of your site without exposing your origin. If you’re tightening up the operational side of a store, it’s a good place to start.