Running an online store means customers trust you with their names, addresses, order history and payment details. That trust comes with responsibility. A security incident can lead to stolen data, fraudulent orders, lost revenue, payment provider penalties and a damaged reputation that is hard to rebuild.
This guide covers ecommerce security and PCI compliance basics for small stores, without the jargon overload.
What is PCI DSS?
The Payment Card Industry Data Security Standard (PCI DSS) is a set of security requirements created by the major card brands and managed by the PCI Security Standards Council. It applies to any business that accepts, processes, stores or transmits card payments, regardless of size.
PCI DSS is not a law in itself, but it is required by the card networks and enforced through your agreement with your payment provider. Not complying can result in fees, higher processing costs or losing the ability to accept cards, and a breach can bring significant costs.
The standard is updated periodically. Version 4.0 and its update, 4.0.1, are the current generation at the time of writing, and they place more attention on the scripts that run on payment pages. Check the PCI Security Standards Council's website for the current version.
Merchant levels and self-assessment
Card brands group merchants into levels based on annual transaction volume. Most small online stores fall into the lowest level, which typically means they validate compliance by completing a Self-Assessment Questionnaire (SAQ) rather than undergoing a full external audit. Your payment provider will tell you what it requires from you.
There are several SAQ types. Two are especially relevant to online stores:
- SAQ A: for merchants that fully outsource card handling, such as redirecting to a hosted payment page or using a provider's secure embedded fields so card data never touches the merchant's systems. This is the shortest questionnaire.
- SAQ A-EP: for ecommerce merchants whose website does not receive card data but does affect the security of the payment page, such as some direct-post integrations. It has considerably more requirements.
Merchants that store, process or transmit card data on their own servers face much more extensive requirements. The exact criteria are set by the Council and your provider, so confirm which SAQ applies to your setup.
The most important rule: keep card data off your server
The single most effective thing a small store can do is avoid handling raw card data at all. Use a payment gateway that collects card details through a hosted payment page or secure fields served by the provider. The card number goes directly to the provider, and your store only receives a reference ID or confirmation.
This approach:
- Greatly reduces your PCI scope
- Means there are no card numbers on your server for attackers to steal
- Lets the provider handle the hardest parts of payment security
Never store full card numbers, CVV codes or card track data in your database, emails, spreadsheets or support tickets. If a customer emails you their card number, do not use it; delete the message and ask them to pay through the secure checkout instead.
Practical ecommerce security steps
Even when card data is outsourced, your store still holds customer information and can be targeted. These steps cover the essentials.
1. Use HTTPS everywhere
Every page should load over HTTPS with a valid certificate. This encrypts data between the customer and your server, including login details and addresses. Learn more in what is SSL and HTTPS.
2. Keep software updated
Outdated platforms, themes and plugins are among the most common ways sites get compromised. For WooCommerce stores, keep WordPress core, WooCommerce, extensions and your theme up to date. Use a staging site for major updates if possible. Our guide on safely updating WordPress themes and plugins explains the process.
3. Remove what you do not use
Deactivate and delete unused plugins and themes. Each one is extra code that could contain a vulnerability.
4. Choose extensions carefully
Install plugins only from reputable sources with recent updates, good reviews and active support. Avoid "nulled" (pirated) premium plugins, which often contain malware.
5. Lock down accounts
- Use strong, unique passwords for every admin account
- Enable two-factor authentication for admin and hosting logins
- Give staff only the access they need, using appropriate roles
- Remove accounts for people who no longer work with you
Our guide to strong passwords and two-factor authentication has more detail.
6. Protect your payment pages from malicious scripts
Attacks known as web skimming or "Magecart-style" attacks inject malicious JavaScript into checkout pages to capture card details as customers type. Defenses include:
- Keeping third-party scripts on checkout pages to a minimum
- Using gateway-hosted fields or payment pages, so card fields load from the provider
- Monitoring files for unexpected changes
- Using a web application firewall
7. Use a web application firewall and malware scanning
A firewall blocks many common attacks before they reach your site. Regular malware scans help you catch problems early. Many hosts offer these at the server level, and security plugins add another layer.
8. Back up regularly
Backups will not prevent an attack, but they let you recover. Keep daily backups with multiple restore points, store copies off-site and test restoring. The 3-2-1 backup rule is a good framework.
9. Secure your hosting
Use SFTP or SSH instead of plain FTP, keep your hosting control panel password strong, and choose a host that isolates accounts and keeps server software patched.
10. Watch for fraud
Security also means protecting yourself from fraudulent orders. Enable address and CVV checks, support 3D Secure, and review suspicious orders before shipping, especially large first-time orders with mismatched billing and shipping details.
Protect customer data beyond payments
PCI DSS focuses on card data, but you also hold personal information. Collect only what you need, publish a clear privacy policy, limit who can access customer records and follow privacy laws that apply to your customers, such as state privacy laws in the US or GDPR if you sell to people in the EU.
Have an incident plan
If you suspect a breach:
- Put the site into maintenance mode if needed to stop further damage
- Contact your host and payment provider immediately
- Change all passwords and revoke unknown accounts
- Restore from a clean backup after identifying how the attacker got in
- Follow legal notification requirements, with professional advice if needed
Our guide on what to do if your website is hacked walks through cleanup in more detail.
Wrapping up
PCI compliance and ecommerce security can sound intimidating, but for most small stores the path is clear: keep card data off your server by using a reputable gateway, complete the questionnaire your provider requires, and maintain good security habits. HTTPS, updates, strong logins, careful plugin choices, backups and monitoring will protect your store and the customers who trust it.