WooCommerce Guide 10 min read

WooCommerce Hosting for Traffic Spikes: How to Test Yours

Find out what your WooCommerce hosting can take before a sale does. See what limits a store under load and how to test a staging copy safely.

In this guide

Key takeaways

  • Under load, a WooCommerce store usually runs out of PHP processes, CPU or database capacity first.
  • Cart, checkout and My Account should stay out of the cache, so they are the pages a test has to include.
  • Test a staging copy with realistic data, tell your host first, and keep payments and emails in test mode.
  • Raise the load in steps and note where response times climb or errors start. That point is your working limit.
  • WooCommerce recommends a performance audit before a server upgrade, so fix what the test finds before you pay for more hosting.

WooCommerce hosting that copes on a normal day can fail during a sale. Traffic spikes arrive all at once, and the pages that take the orders should not be cached. You can find out where your limit is before customers do. This guide covers what runs out under load, how to test a staging copy safely, how to read the results, and whether to upgrade the hosting or fix the site. It ends with a pre-sale checklist.

What limits a WooCommerce store under load

Four things usually run out first. Your host may use different names for them, so ask what your plan calls each one.

Limit What it is What it looks like when it runs out
PHP processes (often called workers) Each request that is not served from a cache needs a PHP process, and a plan allows only so many at once Requests queue, response times jump, then visitors see timeouts or gateway errors
CPU The processing power the plan gives to PHP, the database and everything else Everything slows together, including pages that are cached
Database Where products, orders, sessions and settings live. Checkout writes to it Cart and checkout slow down first, and slow queries pile up
Caching rules Which pages are saved and which are rebuilt for every visitor A fast home page with a slow cart, or cart and account pages cached by mistake

Plans set these limits in different ways. Ask your host which ones apply to you and what happens when one is reached: do requests wait, fail or cost extra? WooCommerce’s scaling FAQ says that choosing a package to suit your expected traffic is key to scaling.

Why a fast home page tells you little

Most pages can be saved and served as ready-made copies, which costs the server very little. WooCommerce’s caching guidance says the cart, checkout and My Account pages should not be cached. They need to stay dynamic, because they show information specific to the current customer and their cart. Every visitor on those pages needs fresh work from PHP and the database.

That is why a speed test of your home page says little about a sale. The visitors who matter are adding to the cart and checking out, and that is the uncached work. A useful test includes those pages. Two checks cost nothing:

  • Confirm the cache rules. Cart, checkout and My Account should be excluded in your caching plugin and in any caching your host runs at the server. The same guide warns that some hosts with server-side caching do not prevent the My Account page from being cached, which can cause password reset loops. If you see that, ask your host to exclude the page.
  • Look at your last busy day. If your analytics recorded a past sale, find its busiest hour and count the add-to-cart events. The scaling FAQ says add-to-cart calls per minute are a good indication of the demands on your server. Use that as the target for your test.

Set up the test safely

A load test sends a burst of requests on purpose. Done carelessly, it slows the live store, leaves test carts behind or looks like an attack. These rules keep it safe:

  1. Use a staging copy, not the live store. Ask your host whether staging runs on the same resources as the live plan. If it does not, the results describe a different server.
  2. Tell your host first. Read their terms on testing and give them the date and time, so the burst is not mistaken for an attack. Ask them to watch the server during the test and send you the graphs for CPU, PHP processes and the database.
  3. Use realistic data. A store with 20 products behaves differently from one with 20,000. A copy of the live database holds customers’ personal details, so limit who can reach staging and ask your host or advisor how to handle them. The alternative is generated sample data, shown below the list.
  4. Keep the side effects harmless. Put payment gateways in test mode, switch off customer emails and SMS, close staging to search engines, and keep analytics tags off so the test does not fill your reports.
  5. Pick a quiet time. Run the test when nobody else needs staging, and stop it if errors climb faster than you expected.

The WC Smooth Generator plugin creates test products, orders, customers and coupons through WP-CLI. Run it on staging only, and pick amounts that match your live store:

wp wc generate products 500
wp wc generate orders 1000

Run a simple load test

k6 is a free, open-source load testing tool. You write the test in JavaScript, and it simulates visitors, which it calls virtual users. Other tools work too, and the method is the same: raise the load in steps and record what happens.

The script below is a starting point. Each virtual user opens the home page and the shop page, adds a product with the add-to-cart address that WooCommerce documents, and opens the checkout. It pauses one second between steps. Each virtual user has its own cookies, so each has its own cart.

import http from 'k6/http';
import { check, sleep } from 'k6';

export const options = {
  // Each stage moves the number of virtual users toward its target.
  stages: [
    { duration: '2m', target: 10 },
    { duration: '2m', target: 25 },
    { duration: '2m', target: 50 },
    { duration: '1m', target: 0 },
  ],
  thresholds: {
    http_req_failed: ['rate<0.01'], // fewer than 1% of requests fail
    http_req_duration: ['p(95)<2000'], // 95% of requests finish in under 2 seconds
  },
};

const BASE = 'https://staging.example.com'; // your staging address, never the live store
const PRODUCT_ID = 123; // the ID of a simple product on staging

export default function () {
  const steps = [
    `${BASE}/`,
    `${BASE}/shop/`,
    `${BASE}/cart/?add-to-cart=${PRODUCT_ID}`,
    `${BASE}/checkout/`,
  ];

  for (const url of steps) {
    const res = http.get(url);
    check(res, { 'status is 200': (r) => r.status === 200 });
    sleep(1);
  }
}

Change the address, product ID and paths to match your store. The numbers are examples: start near your busiest hour, then go higher. Run the script from a computer with a steady connection, since a weak one can become the bottleneck:

k6 run staging-test.js

When it finishes, k6 prints a summary with the median and 95th percentile response times and the share of failed requests. This script reads pages and adds one product to a cart. It does not place orders. A fuller test, with test orders in payment test mode, is the part worth handing to a developer.

Read the results

As the number of virtual users goes up, watch three things: the median and 95th percentile response times, the share of failed requests, and your host’s graphs. Then look for the knee: the load at which the 95th percentile climbs sharply or errors first appear. That is the working limit of this site on this plan.

As a rough yardstick for server response, web.dev calls a time to first byte of 0.8 seconds or less good and over 1.8 seconds poor. It is not a Core Web Vital, and a test from one location is not the same as your visitors’ experience. Use it to judge the shape of your results, not as a pass mark.

What you see It usually points to Check first
Times stay flat, then jump at one load level PHP processes running out, so requests queue Ask the host how many run at once and whether all were busy
Times climb steadily while CPU stays high The CPU limit, or slow PHP code The slowest plugins and pages, with Query Monitor
Home and shop stay fast, cart and checkout slow Uncached work and the database Slow queries, and plugins that hook into the cart
Errors appear before times rise A hard limit or a rule: a process cap, memory, or the host throttling the test The host’s logs for the test window
Slow even with very few users Not a capacity problem: the site itself is slow Why WooCommerce checkout and admin are slow
Fast in the test, slow for real customers A test that is too simple: no logged-in users, no payments, no third-party scripts Add those steps and compare with real sessions

These are rules of thumb, not a diagnosis. Two causes can look alike, which is why the host’s graphs matter.

Fixes to try before you pay for more hosting

Run the test again after each change, so you know what helped. In rough order of effort:

  • Cache what can be cached. Make sure your host or caching plugin saves the pages that are the same for every visitor, with the cart, checkout and My Account pages excluded as above.
  • Check the basics your host provides. WooCommerce’s scaling guide lists PHP OPcache, a CDN for static files and persistent cache support among its baseline hosting requirements. Ask your host which of them your plan has.
  • Add a persistent object cache and turn on High-Performance Order Storage. Both are explained in why WooCommerce checkout and admin are slow, together with the fix for a backed-up Action Scheduler queue.
  • Remove the plugins that cost the most. Query Monitor shows which plugins and queries take the time on a page. If nobody uses a plugin, delete it.

Should you upgrade the hosting or fix the site?

WooCommerce’s scaling guide recommends running performance audits on the site before upgrading a server. The reason is practical: if one plugin or query causes the slowdown, a bigger server only hides it until the next spike. Your test results help you decide.

Fix the site first when:

  • It is slow with only a few virtual users.
  • One page, plugin or query accounts for most of the time.
  • Cart and checkout are slow while the cached pages are fast.
  • Errors appear while the host’s graphs show CPU and PHP processes well below their limits.

Upgrade the hosting when:

  • The site is quick at low load and the caches are working.
  • The host’s graphs show CPU or PHP processes at their limit at about the load you expect on sale day.
  • The plan’s own caps are below your forecast.

If you do need more, ask about a temporary change first. The same guide notes that with many hosts you can scale to a higher configuration during peak traffic. Ask yours how long a change takes, what it costs and how to switch back. Then run the test again to confirm it helped. I would not move to a different host in the last two weeks before a sale unless the current one is failing. A migration brings risks of its own.

A pre-sale checklist

Black Friday is November 27 this year in the US, and Cyber Monday is November 30. Work through this list on staging, then repeat the cache and version checks on the live store before the sale starts. The Black Friday readiness checklist covers the rest of the preparation.

  • Hosting limits written down: PHP processes, CPU, memory, database and bandwidth, and what happens when each one is reached
  • Host told the test date and the sale dates, and a contact for the sale weekend agreed
  • Staging copy on the same kind of plan, with realistic amounts of data
  • Payments in test mode, customer emails and SMS off, staging closed to search engines
  • Load test run in steps, with response times and the share of failed requests saved
  • Cart, checkout and My Account excluded from every cache layer, in the plugin and at the host
  • Persistent object cache working, and High-Performance Order Storage on if your setup supports it
  • Slowest plugins and queries reviewed, and unused plugins removed
  • PHP and database versions meet the WooCommerce server requirements
  • Fixes tested again, with before and after numbers saved
  • Temporary plan upgrade option confirmed with the host, including how to switch back
  • Plugin and theme updates frozen from a set date before the sale

When it is worth getting help

Much of this is work a careful store owner can do. Bring in help when:

  • The results do not make sense, or two causes look alike.
  • The site is slow even with very few users, and you cannot tell which plugin or query is responsible.
  • Your host says everything is fine, but customers see errors.
  • There is no staging copy, or building one would take longer than the time you have.
  • The sale is close and nobody on the team has time to run the test.

I audit WooCommerce stores: the theme, plugins, hosting and integrations, then I send a written, prioritized list with an estimate for each item. Changes are built on a staging copy, and I send before and after numbers. You can read how that work is set out on the WooCommerce and WordPress developer page and the speed, SEO and tracking page, and see examples in selected work. If you want a second pair of eyes, send me the store address and what you are seeing. I will reply with what I think is causing it and what I would check first.

Common questions

How much traffic can my WooCommerce hosting handle?

There is no single number, because it depends on your plan's limits, your theme and plugins, and how much of each visit can be served from a cache. The reliable way to find out is to test a staging copy and raise the load in steps. WooCommerce's scaling FAQ suggests using your average add-to-cart calls per minute as a guide to the demand on your server.

Can I load test my live store?

I would not. A test sends a burst of requests, so it can slow the store for real customers, leave test carts and sessions behind, and look like an attack to your host. Test a staging copy, and tell your host before you start.

Is a CDN enough to handle a traffic spike?

A CDN helps with images, scripts and other static files, and WooCommerce's scaling guide lists one among its baseline hosting requirements. It does not remove the work of the cart, checkout and My Account pages, which should stay uncached because they show customer-specific information. That work still lands on your server.

Should I upgrade my hosting before Black Friday?

Test first. WooCommerce recommends running performance audits before upgrading a server, and a bigger plan will not fix a slow plugin or query. If a healthy site still runs out of resources at the load you expect, ask your host about a larger plan, or a temporary move to a higher configuration for the sale.

Sources and further reading

Tell me what's not working.

Send the store address and a few lines about the problem. I'll reply with what I think is causing it, what I'd do first, and whether I'm the right person for the job.

Email
hi@m-ali.dev
Reply time
I usually reply within one business day.

I usually reply within one business day.

I use your details only to reply to you. Privacy notice

Keep reading