Free 20-point conversion & SEO audit for export stores — Free website audit — claim yours

hello@woo.one Mon–Fri · 9:00–18:00 (UTC+8)

Security Hardening for WooCommerce Stores

Four ways stores actually get compromised, and the configuration that blocks them: two-factor, least privilege, update policy, filesystem rules and monitoring.

Store security is not a firewall plugin. It is a set of decisions about who can do what, what gets updated and how quickly you would know if something went wrong. Most breaches on small ecommerce sites follow a short list of causes, and most of them are configuration.

The four ways stores actually get compromised

  1. A vulnerable plugin, often one that has been abandoned, exploited within days of disclosure
  2. Weak or reused admin credentials, usually with no second factor
  3. An exposed staging copy or backup file, indexed or guessable
  4. Stolen FTP or hosting credentials, sometimes from a developer’s machine rather than the server

Notably absent: sophisticated attacks. The realistic threat model for a store doing a few million in revenue is automated scanning for known-bad plugins and weak logins.

Access: the part that pays

Two-factor authentication on every admin account, without exceptions. This single control blocks most credential-based compromise, including the case where a password leaks from somewhere else.

No shared admin accounts. One account per person, so an offboarding is a deactivation rather than a password change everyone must coordinate.

Least privilege by role. Editors do not need plugin installation rights. A shop manager does not need to edit theme files. WordPress ships with DISALLOW_FILE_EDIT for exactly this reason — enable it.

Rename or protect the login path, and limit attempts. This is not real security on its own, but it removes the vast majority of automated noise, which makes real attacks visible.

Audit who has access. Stores accumulate accounts: former agencies, former staff, a developer who helped once. Review the list every quarter; it is usually longer than expected.

Updates: policy beats urgency

“Update everything immediately” and “never update” are both wrong. A workable policy:

Component Policy
Security patches Within 24–48 hours, after a staging check
Minor plugin updates Weekly, batched, on staging first
Major version updates Planned, with a rollback plan
Abandoned plugins Replace, not patch

The critical judgement is recognising abandoned software. Signals: no update in 12+ months, support threads unanswered, “tested up to” far behind current WordPress. These are not maintained, and a vulnerability in them will not be fixed. See plugin selection for how to evaluate this before installing.

Filesystem and server

  • File permissions — directories 755, files 644, and no world-writable anything
  • Disable PHP execution in uploads — the classic path for uploaded shells
  • Turn off directory listing
  • Keep wp-config.php outside the web root where the host supports it
  • Remove unused themes and plugins — deactivated code is still code on disk

The last one is underrated. An unused plugin with a known vulnerability is exploitable even when deactivated, if it can be reached directly.

What must never be public

Staging environments. A staging copy with noindex is still reachable by anyone with the URL, and often has weak credentials and real customer data. Put it behind HTTP authentication, or restrict by IP.

Backup files. A .sql or .zip in the web root is a data breach waiting to be crawled. Store backups outside the docroot, always.

.git directories and .env files, left behind by deployments.

Debug logs and error output. In production, WP_DEBUG_DISPLAY must be off. Visible errors reveal paths, plugin versions and sometimes query contents.

Monitoring: how would you know

Three things worth monitoring, in order of value:

File integrity. Changes to core files or to plugin files you did not update are the clearest signal of compromise. A weekly diff catches backdoors that a firewall misses.

Login activity. Failed attempts, successful logins from new locations, and new admin accounts created.

Outbound connections. Unexpected requests from the server, which is often how a compromised site exfiltrates data or sends spam.

Add uptime and error monitoring while you are there — a store that is down and nobody notices is a different failure with the same symptom.

Payments: reduce your scope

If card data ever touches your server, your compliance burden expands considerably. The practical mitigation is to never let it:

  • Use hosted fields or a redirect flow, so the card number goes from the browser to the gateway
  • Avoid plugins that store card data locally
  • Keep your PCI self-assessment scope minimal — this is a paperwork benefit as much as a security one

The minimum set

  1. Two-factor authentication on all admin accounts
  2. No shared admin users; quarterly access review
  3. File editing disabled; uploads not executable
  4. Security patches within 48 hours; weekly minor updates via staging
  5. No public staging, no backups in the docroot
  6. File integrity monitoring and login monitoring
  7. Hosted payment fields, no card data on the server
  8. A written incident plan: who does what in the first hour

None of this is expensive. Most of it is configuration that takes an afternoon, and it competes with far more glamorous projects for attention — which is why it usually gets done after the first incident rather than before.

It is part of what we cover in site maintenance, and the first output is usually an inventory: what is installed, what is abandoned, who has access.

S

Infrastructure and security engineer at woo.one, based in Foshan, China. Works on WordPress, WooCommerce and OpenCart systems, self-hosted mail, and the operational side of running stores for exporters.

More about the team

No pressure · No sales script

Ready for a store that sells while you sleep?

Send us your current site or product list. You will receive a fixed-scope proposal, a 20-point audit and a realistic timeline within two business days.

Reply within 1 business day NDA on request 100% code ownership
Chat with us
WhatsApp Get a quote