How to Secure Your Ecommerce Store: 10 Steps That Stop Real Attacks in 2026

By EcommerceViews Editorial Team December 1, 2026 December 1, 2026 (updated) 14 min read
How to secure your ecommerce store in 2026

Most attacks on online stores are not personal. Bots scan thousands of shops a day. They look for an old plugin, a weak admin password or a checkout page they can tamper with. When they find one, they move fast. In October 2025, Sansec saw more than 250 attacks on Magento stores within 24 hours of exploit details for a flaw called SessionReaper going public. Adobe had released the fix six weeks earlier, yet about 62% of stores still had not installed it.

The good news is that most break-ins use a short list of weak spots. This guide covers ten steps that close them, in the order that gives a small store the most protection for the least effort. Every section lists actions you can take this week.

Why Unpatched Software Is Now the Main Way In

For years, stolen passwords were the top way attackers got into a business. That changed in 2026. Verizon’s 2026 Data Breach Investigations Report found that exploiting known software flaws caused 31% of breaches, ahead of phishing at 16% and stolen credentials at 13%. It was the first time in the report’s 19 years that flaws beat passwords.

For a store owner, that means updates matter more than anything else on this list. Attackers do not need to guess your password if your checkout plugin has a public hole.

What to keep current

  • Your store software, whether that is OpenCart, WooCommerce, PrestaShop or Magento Open Source.
  • Every theme and extension, including ones you installed once and forgot.
  • PHP, the database server and the operating system, which your host may or may not update for you.
  • Admin tools that sit beside the store, such as phpMyAdmin or an old analytics install.

How to patch without breaking your store

  1. Subscribe to security alerts from your platform and from the makers of each paid extension.
  2. Apply security fixes within 72 hours. Feature updates can wait for your normal monthly window.
  3. Test larger updates on a staging copy first, then repeat them on the live store during a quiet hour.
  4. Delete extensions you no longer use. A disabled plugin can still be attacked if its files are on the server.

Keep HTTPS on Every Page and Automate Your Certificate

HTTPS encrypts data as it travels between a shopper’s browser and your server. Without it, browsers show a “Not secure” warning and payment providers may refuse to work with you. Worse, anyone on the same network can read what customers type. If you want the technical background, our guide to Transport Layer Security (TLS) explains how the encryption works.

Most stores already have HTTPS. The new risk is an expired certificate. Since 15 March 2026, public TLS certificates can last no more than 200 days. The limit falls to 100 days in March 2027 and 47 days two years later. A certificate you renew by hand once a year will soon need renewing every few weeks.

  • Use a free Let’s Encrypt certificate from your host, or a paid one if you need organisation validation.
  • Turn on automatic renewal and check that it actually ran after the first cycle.
  • Redirect all HTTP traffic to HTTPS so no page loads without encryption.
  • Add an uptime monitor that alerts you when the certificate is within 14 days of expiry.

Pick a Platform That Fixes Security Problems Quickly

This choice decides how much protection work lands on you. Hosted platforms such as Shopify patch the core software and run the servers. They also handle PCI compliance for their own checkout. Self-hosted platforms such as OpenCart, WooCommerce and Magento Open Source give you more control, but you or your developer must install every fix.

Neither choice is wrong. The mistake is choosing self-hosted software without a plan for who patches it. If you are still deciding, our guide on building an ecommerce store walks through the main options.

Questions to ask before you commit

  • How quickly were the last three security fixes released after the problem was reported?
  • Does the admin panel support two-factor login without an extra paid plugin?
  • Can you set user roles so staff only see what they need?
  • Who keeps the server, PHP version and database up to date: you, your host or the platform?

Protect Admin Logins With Long Passwords and Two-Factor Login

Your admin panel is the master key to the store. Anyone who gets in can change prices, export customer data or add a card skimmer to the checkout.

Password advice has changed. NIST’s digital identity guidelines, updated in July 2025, now favour length over complex symbol rules. They also say organisations should not force people to change passwords on a schedule. Forced changes tend to produce weaker passwords such as “Summer2026!” followed by “Autumn2026!”. A password should change when there is a reason, such as a leak.

Set stronger login rules

  • Require at least 15 characters for any account that relies on a password alone. A short phrase such as “blue-kettle-river-stamp” is easy to remember and hard to guess.
  • Block passwords that appear in known breach lists. Many security plugins can check this for you.
  • Give every staff member their own login. Shared accounts make it impossible to see who changed what.
  • Use a password manager so nobody reuses a login from another site.

Add a second step to every admin login

  • Turn on two-factor authentication for every staff account, not only the owner’s.
  • Prefer an authenticator app, a passkey or a hardware security key over SMS codes, which can be stolen through SIM swaps.
  • Limit failed login attempts, for example five tries before a 15-minute lockout.
  • Restrict the admin area to known IP addresses if your team works from fixed locations.

Keep Card Data Off Your Servers

The safest card data is the data you never touch. Payment providers such as Stripe, PayPal and Adyen can host the card fields for you. The card number then goes straight to them. Your store only receives a token that stands in for the card. If your server is hacked, there is no card data to steal.

This also shrinks your PCI DSS work. PCI DSS is the card industry’s security standard, and version 4.0.1 is the one in force. Merchants who fully hand off payments can usually complete the shortest questionnaire, called SAQ A. Since 2025, though, SAQ A comes with a condition: you must confirm that your own pages are protected against scripts that target payment data. The next section explains how.

How to set up payments safely

  • Choose a hosted payment page or an embedded card form (iframe). Avoid card fields built into your own code.
  • Switch off “save card” features in your store software unless the provider stores the card, not you.
  • Turn on the provider’s fraud screening and 3-D Secure checks. Our analysis of Strong Customer Authentication and fraud data shows why extra checks cost fewer sales than many owners fear.
  • Review chargebacks and failed payments weekly. A sudden run of small declined charges often means someone is testing stolen cards on your store.

Watch Every Script That Runs on Your Checkout

Card skimming, often called Magecart, is the attack most specific to online stores. Criminals add a few lines of JavaScript to your checkout. The script copies card details as shoppers type and sends them to the attacker. The order still goes through, so neither you nor the customer notices.

Skimmers increasingly hide in tools you already trust. In June 2026, Sansec reported a skimmer that loaded through Google Tag Manager and used Stripe’s own systems to store its code and the stolen cards. Because both domains looked normal, basic security filters let the traffic through.

Lock down your checkout pages

  1. List every script that loads on your cart and checkout pages, including chat widgets, analytics and ad pixels.
  2. Remove any script that has no clear reason to be on those pages. Each one you cut is one less place to hide code.
  3. Limit who can publish changes in Google Tag Manager, and turn on two-factor login for that account.
  4. Add a Content Security Policy that only allows scripts from domains you approve.
  5. Use a monitoring tool that alerts you when a checkout script or template file changes.

If you build your own payment form instead of using a hosted one, PCI DSS requirements 6.4.3 and 11.6.1 apply in full. You must keep a list of every script, approve each one and detect unauthorised changes.

Back Up Daily and Practise a Full Restore

A backup is only useful if you can restore it quickly. Many owners learn after an attack that their backups were stored on the hacked server, were already infected, or had never been tested.

What to back up

  • The database, with orders, customers, products and settings, at least daily.
  • Store files, themes, extensions and uploaded images, weekly and after every update.
  • Server and admin logs, which help you work out when an attack started.

Where and how to keep it

  • Store copies away from your web server, for example in cloud storage with separate login details.
  • Keep at least 30 days of daily versions, so you can go back to a point before an infection began.
  • Run a test restore to a staging site every quarter and time how long it takes.
  • Write the restore steps down and note who to call, including your host’s support line.

Put a Web Application Firewall in Front of Your Store

A web application firewall (WAF) checks each request before it reaches your store. It blocks common attacks such as SQL injection, cross-site scripting and bots that test stolen cards at checkout.

A WAF also buys time. When a new flaw is announced, WAF providers often add a rule that blocks it within hours. That protects you while you test and install the real fix.

  • Cloud services such as Cloudflare, Sucuri and AWS WAF sit in front of your site and need no code changes.
  • Plugin firewalls run inside your store software. They are easy to install but use your server’s resources.
  • Some managed hosts include a WAF already, so check your plan before paying twice.

Start with the provider’s default rules, then allow-list your payment provider and any services that call your store. Check the blocked-request log monthly so you can spot a real customer being stopped by mistake.

Give Staff and Partners Only the Access They Need

Outside firms are now a major source of breaches. Verizon’s 2026 report found a third party involved in 48% of breaches, up from 30% a year earlier. For a store, that means your web agency, freelance developers and app vendors. It also covers any service holding an API key to your shop.

  • Create roles by job. A support agent needs orders and customers, not payment settings or the theme editor.
  • Remove access for staff and contractors on their last day, not at the next quarterly review.
  • Give agencies their own accounts with two-factor login, and close them when the project ends.
  • Review API keys and connected apps every three months, and delete any you no longer use.
  • Turn on admin activity logs so you can see who changed what, and when.

Monitor, Scan and Train Your Team

Attacks are cheaper to fix when you catch them early. A skimmer found on day one exposes a few dozen cards. One found after three months can expose thousands.

Set up early warnings

  • Run a malware scan at least weekly. Free outside checks such as Sucuri SiteCheck catch obvious infections, while server-side scanners such as Sansec’s eComscan look deeper.
  • Turn on file change alerts for core files, templates and checkout code.
  • Read admin sign-in alerts. A login from a new country at 3 a.m. deserves a look.

Teach staff what attacks look like

Phishing still starts 16% of breaches in Verizon’s data. A fake “Shopify billing problem” or “PayPal dispute” email can hand over an admin login in seconds.

  • Show new hires real examples of phishing emails aimed at store owners.
  • Agree a simple rule: nobody enters a password from a link in an email. Open the site directly instead.
  • Make it easy to report a suspicious message, and thank people who do, even when it turns out to be harmless.

A 30-Minute Monthly Security Check

Put this on the calendar for the first Monday of each month.

  1. Install any pending updates for the platform, theme and extensions.
  2. Confirm the last automatic certificate renewal worked.
  3. Check that last night’s backup exists in offsite storage.
  4. Remove user accounts, API keys and apps nobody uses.
  5. Run a malware scan and read the results.
  6. Compare the scripts on your checkout with last month’s list.
  7. Skim the firewall and login logs for anything unusual.

What to Do If Your Store Is Hacked

Speed matters more than perfection. If you see signs of an attack, such as a strange script on the checkout, unknown admin users or customers reporting fraud after buying from you, work through these steps.

  1. Put the store into maintenance mode or disable checkout to stop further card theft.
  2. Change every admin, hosting, database and payment provider password, and revoke API keys.
  3. Call your host and your payment provider. They have seen this before and may need to act on their side.
  4. Restore from a clean backup taken before the infection. Install all pending updates, and only then reopen the store.
  5. Get advice on your legal duties. In the UK and EU, a breach of personal data usually has to be reported to the data protection authority within 72 hours of you becoming aware of it.

Where to Start This Week

You do not need to do all ten steps at once. If you have one afternoon, spend it on these four:

  • Install every pending security update and delete unused extensions.
  • Switch on two-factor login for each admin account.
  • Check that payments run through a hosted page or embedded form, so card numbers never reach your server.
  • Move backups offsite and test one restore.

Those four changes close the routes behind most store break-ins. Add the monthly check, and security becomes a 30-minute routine instead of an emergency.

E

Written by

EcommerceViews Editorial Team

The EcommerceViews editorial team writes and signs off our platform reviews and rankings, including all our coverage of OpenCart. Every review follows our published review process, and no platform pays to be included or sees a review before it goes live.