tadrik Free store check

Guides / WooCommerce

WooCommerce Slow or Down on Black Friday: First Hour

Updated

If your WooCommerce store is slow, timing out or down while sale traffic arrives, work through the checks below in order. The first four take minutes and often fix it.

Do one thing at a time and write down the time and what you changed. If you change five things at once, you will not know which one worked.

1. Look at the store as a customer sees it

Open a private window, add one product to the cart and go to the checkout. Note which step is slow: the product page, the cart, the checkout, or the Place Order click. A slow checkout and a slow home page point to different causes.

Then check your host's error log, and the WooCommerce logs under WooCommerce, Status, Logs. Errors that say timeout, memory exhausted or 503 at the time of the slowdown tell you where to look next.

2. Keep the cart and checkout out of the cache

Full-page caching makes the product pages fast. The cart, checkout and My Account pages must not be cached, because they are different for every customer. WooCommerce's own guide says to exclude those three pages in your caching plugin, and to exclude the woocommerce_items_in_cart and woocommerce_cart_hash cookies. Check this in your caching plugin and in any caching your host runs. A cached checkout shows customers someone else's cart or an old state, and a missing exclusion can look like a crash.

Source: WooCommerce: how to configure caching plugins.

3. Ask your host about PHP workers and limits

Every request to your store uses one PHP worker (some hosts call them threads) for as long as it runs. When all workers are busy, new requests wait in a queue, and customers see slow pages, 504 timeouts or a checkout that freezes when they press Place Order. Kinsta describes each thread as a checkout lane that can only process one request at a time, and says the symptoms of too few are pages that stall under load, gateway timeouts and failing checkouts.

Ask your host these three things, by chat if you can:

  1. How many PHP workers or threads does my plan have, and are they all busy now?
  2. What is the PHP memory limit, and is the store hitting it?
  3. Can you raise both for the sale week?

Many hosts will raise them for a few days. This is often the fastest fix, because it does not touch the store.

Source: Kinsta: scaling your site for Black Friday.

4. Check the payment gateway's status page

If the page loads but Place Order hangs or fails, the gateway may be slow or down, and nothing on your store will fix that. Check Stripe's status page or PayPal's status page (or your own gateway's) before you change anything on the store. If the gateway reports a problem, tell customers on the checkout page and wait.

5. Find what the checkout waits for

If only the checkout or Place Order is slow, something is making it wait. A common cause is a plugin that calls an outside service while the order is placed. In one recent WordPress.org thread, a store's cash-on-delivery order took 70 to 80 seconds. The owner installed the Query Monitor plugin and found slow outside calls during checkout. That thread has no confirmed fix, which shows how hard this is to find without the tool.

Two different requests can be slow, so check them separately:

  • A slow checkout page. Install Query Monitor, open the checkout while logged in, and look at the slow queries and outside (HTTP) calls. This profiles the page load only.
  • A stall after you click Place Order. That happens in a separate request, which a page-load profile does not show. In a controlled test (one test order, at a quiet time), note the time from the click to the result, for example in your browser's network tab, and compare it with the WooCommerce logs and your host's error log for the same minute.

Only then try to isolate a plugin, and do it on a test copy of the store, one plugin at a time. Do not turn off anything that takes the payment or the order on the live store.

Source: WordPress.org thread: extremely slow checkout, Place order takes 80 seconds.

6. Check the Action Scheduler backlog

WooCommerce runs background jobs, such as renewals, emails and stock updates, through a queue called scheduled actions. Open WooCommerce, Status, Scheduled Actions. A long list of pending actions is normal, because many are scheduled for later. Look for past-due (overdue) actions and for the same action failing again and again, and read the log of the failed ones. Then ask your host whether queue activity matches the times the store was slow. WooCommerce says the jobs run when people visit the site, and suggests a real server-side cron job so they run on time. Only change cron if the queue is overdue and the timing matches, and ask your host to do it if you cannot.

Slowdowns when several customers check out at once are also reported by store owners. One WordPress.org thread describes checkout slowing down under concurrent orders. It reports the symptom without a confirmed fix, so use the timing check above rather than assuming a cause.

Sources: WooCommerce: scheduled actions in the system status report, WordPress.org thread: concurrent checkout slowdowns.

7. Think about the last update

If the slowdown or errors began right after a plugin or theme update, the update is the first suspect. In a recent WordPress.org thread, the owner first noticed the store slowing down and then returning HTTP 500 errors after an update. Later they suspected bot traffic after checking their bandwidth. The thread gives no confirmed cause or fix, so it does not show that the update was to blame. It does show why you should compare the timing of the update with your traffic and bandwidth before you blame either one.

Rollback is a separate step, and only for when the trouble clearly began with an update. Before you roll anything back:

  1. Ask your host for a test copy of the store that is isolated before it first starts: closed to public traffic, with scheduled jobs (cron and scheduled actions) paused, all outbound email blocked, and live services such as shipping, stock and accounting syncs disconnected. A copied store can run renewals and send messages as soon as it starts, so this has to happen first.
  2. On the copy, allow only test-mode (sandbox) payments. Then try the rollback and a test checkout there. Do not change the live store before that works.
  3. Ask your host to confirm the older version works with the current database, because replacing plugin files does not undo database changes the update made.
  4. Check the changelog of the plugin that updated last, and its support forum, for the same symptom.
  5. On the live store, pause checkout for a few minutes, for example with a maintenance notice, and take a fresh backup of the files and the database. Check with your host that it can be restored.
  6. Roll back one plugin only, and only if the trouble began with that update. Then run one test order and reopen checkout.

If something goes wrong and the host has to restore an older backup instead of the fresh one, ask them to capture the orders placed since that backup and put them back before you reopen checkout.

The WP Rollback plugin does this in a few clicks, but its author strongly advises against using it on a live site and says to test on a test copy first. Replacing the plugin files does not undo database changes the update made, so an older version may not work with them. That is why the live rollback is the last step, after the test copy and the fresh backup.

Sources: WP Rollback, WordPress.org thread: store slowing and crashing, WooCommerce: how copied sites handle subscriptions, WooCommerce: how to update WooCommerce safely.

8. Lighten the pages you changed for the sale

Banners, countdown timers, pop-ups and chat tools make a page heavier. Hostinger notes that a page which was fast in October can be slow in November once a larger hero image, a countdown widget and a chat tool are added. Compress the new images, remove widgets you do not need on the checkout, and keep pop-ups off the cart and checkout.

Source: Hostinger: Black Friday website performance.

After the first hour

When the store is stable, run one test order from a private window and confirm you get the order and the emails. Then stop making changes until the sale ends. Late changes are how a working store breaks during the biggest days.

If you have been through these steps and the store is still slow, or you cannot afford to lose more orders while you test, we can find the cause and fix it. Send us the store address and what you see through the Fix form. See the Fix page for what is included and the current price.

See also: WooCommerce checkout not working and the error screen after a WooCommerce update.

Common questions

Should I turn off plugins on the live store during the sale? Only one at a time, only ones that are not needed to take an order, and write down what you turned off. Never switch a payment gateway to test mode on the live store, because real customers would then check out against the sandbox.

Is it my host or my store? Check the host's error log and ask for the PHP worker or thread count and memory limit. If requests queue or time out while the store has little else going on, the limit is usually the host's. If a single plugin or outside call takes most of the page time, it is the store.

Can I roll back the last plugin update on a live store? Only after you have rolled back and tested checkout on a test copy. The WP Rollback plugin itself warns against rolling back on a live site, and an older plugin version may not work with database changes the update made. Ask your host whether the older version is compatible with the current database, and pause checkout and take a fresh backup just before the live rollback, so no orders are lost.

Why is the store fast for me and slow for customers? You may be logged in, which skips the page cache. Test in a private window with an item in the cart. Customers hit the cache, the cart and the checkout in a different mix than you do.