Skip to main content
Zass Tech
Free audit
Web Development10 min read

WooCommerce Hosting Suspended for CPU Limits? Check the Page Cache First

By Shakh Farid·November 18, 2026·0 views
#WooCommerce#WordPress#Hosting#Page Cache#Cloudflare#Website Speed

Short answer: If your shared host suspends a WooCommerce store for CPU or RAM overuse, check whether full-page caching is actually running before you buy a bigger plan. In the case below, a cache plugin was installed but its page cache was switched off, so every visitor and every bot made WordPress run PHP and MySQL from scratch. Turning the cache on, keeping cart and checkout out of it, and blocking bots from add-to-cart links fixed the problem without a hosting upgrade.

What happened

The store sells school stationery and kids' learning toys in Bangladesh. It runs WordPress and WooCommerce on a regular shared cPanel plan, with a catalogue of a few hundred products. A normal small shop, nothing unusual.

One morning the owner got an email from the host: the account had been suspended because of "long-running processes" hitting the CPU and memory limits. The host reopened the site for 60 minutes so the cause could be fixed, and warned that it would be suspended again if usage stayed high.

The owner's first thought was that the site had become "too heavy" and needed a more expensive plan. That turned out to be wrong.

Why WooCommerce hits CPU limits on shared hosting

Shared hosting gives every account a fixed slice of the server: a CPU cap, a memory cap, and a limit on how many PHP processes can run at once (often called entry processes). When an account goes over these for too long, the host throttles it, shows a "Resource Limit Is Reached" error, or suspends it.

Without a page cache, every page view on a WooCommerce site works like this:

  1. The web server starts PHP.
  2. WordPress loads its core, the theme and every active plugin.
  3. WooCommerce runs database queries for products, prices, stock and the visitor's session.
  4. The page is built and sent.

That's fine for a few visitors. It isn't fine when search engine crawlers, price scrapers and spam bots hit hundreds of URLs in a few minutes. Each hit uses a full PHP process, so the account runs out of its share.

A page cache saves the finished HTML of a page the first time it's built. Later visitors get that saved file, and with the right setup PHP and MySQL don't run at all. On a shop, that's the difference between a few dozen PHP runs a minute and a few thousand.

How I found the real cause

I had one hour, so I checked things in order of likelihood instead of guessing.

1. Is the database bloated? No. It was small and healthy: no giant log tables, no millions of expired sessions. That ruled out the usual slow-query suspects.

2. Is a cache plugin installed? Yes. W3 Total Cache was active, so at first glance the site looked "cached."

3. Is the page cache actually on? This is where it broke down. W3 Total Cache keeps its settings in a config file, and in that file the page cache was set to false. The plugin was installed and showed in the dashboard, but the feature that matters most was off.

4. Is something else in the way? In wp-content/ there was an advanced-cache.php file left behind by a different caching plugin that had been removed earlier. WordPress loads that file very early on every request, before any plugin. A stray copy from the wrong plugin can stop the real cache from working, or quietly do nothing at all.

5. What's hitting the site? The traffic pattern showed bots requesting URLs like /?add-to-cart=1234. Every one of those requests skips any cache, starts a WooCommerce session and writes to the database. Bots follow these links because they appear in the shop's HTML as plain links.

So the cause wasn't a "heavy" site. It was an uncached site under bot traffic, on a plan with hard limits.

The fix, step by step

Step 1: Remove the stray drop-in

I deleted the leftover advanced-cache.php that belonged to the old plugin, so W3 Total Cache could write its own. If you're not sure which plugin owns the file, open it: the first lines almost always name the plugin.

Step 2: Turn on page caching with "Disk: Enhanced"

In W3 Total Cache I enabled Page Cache and chose Disk: Enhanced. With this method the plugin writes rewrite rules into .htaccess, so the web server can send the cached HTML file directly. PHP doesn't start for a cached hit, and on a CPU-limited plan that's the whole point.

Step 3: Keep the dynamic pages out of the cache

This is the step people skip, and it's the one that can break a shop. Some WooCommerce pages are different for every visitor and must never be cached. If they are, one customer can see another customer's cart, or checkout fails because of an expired security token.

I excluded these URLs:

Excluded URLWhy
cart/Different for every visitor
checkout/Holds a security token (nonce) and the customer's details
my-account/Private customer data
track-order/Shows order details after a lookup

And I told the cache to skip any page for visitors who have these cookies:

Rejected cookieWhat it means
woocommerce_items_in_cartThe visitor has something in the cart
woocommerce_cart_hashThe cart contents have changed
wp_woocommerce_session_The visitor has an active WooCommerce session

The cookie rule mattered on this site because the header shows the number of items in the cart. Without it, a shopper with three items could get a cached page that still says "0." Logged-in users were already excluded by default.

🎯
Zass Tech service
Google Ads Management

Full-funnel campaign management, from setup to scaling spend profitably.

→

Step 4: Stop bots from adding products to the cart

I did two things.

First, robots.txt asks well-behaved crawlers to stay away from cart actions:

User-agent: *
Disallow: /*add-to-cart=*
Disallow: /cart/
Disallow: /checkout/
Disallow: /my-account/

Second, because many bots ignore robots.txt, a small function in the theme returns a 403 Forbidden when a bot user agent requests an add-to-cart link:

add_action( 'init', function () {
    if ( ! isset( $_GET['add-to-cart'] ) ) {
        return;
    }
    $ua = isset( $_SERVER['HTTP_USER_AGENT'] ) ? strtolower( $_SERVER['HTTP_USER_AGENT'] ) : '';
    if ( preg_match( '/bot|crawl|spider|slurp|facebookexternalhit/', $ua ) ) {
        status_header( 403 );
        exit;
    }
}, 1 );

Real shoppers never send a bot user agent, so this doesn't affect them. The check runs at init, before WooCommerce does any cart work.

Step 5: Put Cloudflare in front

I moved the domain's DNS to Cloudflare's free plan and turned on the proxy for the website records. That gives you two things on a small budget: static files like images, CSS and JavaScript are served from Cloudflare's edge, and Bot Fight Mode challenges a lot of automated traffic before it reaches the server.

Keep the mail and FTP records as "DNS only" (grey cloud). Cloudflare's free proxy only handles web traffic, so proxying those breaks email apps and FTP uploads.

How to check that the cache really works

Don't trust the settings screen. Test it.

  • View the page source of your homepage while logged out and scroll to the bottom. W3 Total Cache adds a comment there. Page Caching using Disk: Enhanced with a "Served from" line means you got a cached copy.
  • Load the page twice. The second load should be clearly faster.
  • Test the cart path. Add a product to the cart, then reload the homepage. The comment should now say the page wasn't cached because of a rejected cookie. Open checkout: it should say the URI is rejected.
  • Check from the command line if you're comfortable with it. curl -s https://yoursite.com/ | tail shows the same comment without browser caching getting in the way.

On this store, all four checks passed: anonymous visitors got static HTML, shoppers with items in the cart got fresh pages, and checkout was never cached.

Mistakes to avoid

  • Upgrading the plan first. More CPU hides the problem for a while, but an uncached shop under bot traffic will reach the new limit too.
  • Caching checkout. It can look fine in a quick test and then fail for real customers with "Your session has expired" errors.
  • Forgetting the cart-count cookie. If your header or mini-cart shows a count, the cookie exclusion isn't optional.
  • Running two cache plugins. They fight over advanced-cache.php and .htaccess. Pick one and remove the other completely, including its leftover files.
  • Not purging after changes. After editing the theme or prices, purge the cache so visitors don't get old pages.

When this isn't enough

Caching fixes most shared-hosting CPU problems for small and mid-sized shops. If you've done all of the above and still hit limits, look at uncached load: heavy admin use, large imports, many logged-in customers, or slow plugins running on every request.

For this store I later moved it to a LiteSpeed-based host with more headroom. That was a planned upgrade, not an emergency fix, and the cache settings had to be checked again after the move, because a migration can bring back old settings files. If you're choosing a host for a Bangladeshi shop, I compared real offers in my WooCommerce hosting guide for Bangladesh (in Bangla).

FAQ

Why does my WooCommerce site use so much CPU on shared hosting?

Usually because pages aren't cached. Without a page cache, every visit, including bot visits, runs PHP and database queries. Shared plans have hard CPU and process limits, so bot traffic alone can push an uncached shop over them.

Is it safe to cache a WooCommerce store?

Yes, if you exclude the cart, checkout and account pages, and skip the cache for visitors who have WooCommerce cart or session cookies. Product, category and content pages are safe to cache for anonymous visitors.

Which pages should never be cached in WooCommerce?

Cart, checkout and my-account, plus any page that shows customer-specific information, such as an order tracking page. Also skip caching for logged-in users and for anyone with the woocommerce_items_in_cart, woocommerce_cart_hash or wp_woocommerce_session_ cookies.

How do I stop bots from adding products to the cart?

Disallow add-to-cart URLs in robots.txt for polite crawlers, and return a 403 to bot user agents that request ?add-to-cart= links. A firewall such as Cloudflare's Bot Fight Mode stops much of the rest before it reaches your server.

Do I need to upgrade my hosting plan?

Not as a first step. Confirm that page caching works and that bots aren't hammering uncached URLs. Upgrade when real, uncached traffic such as logged-in shoppers and checkouts needs more resources.


This post is based on hands-on work on a live Bangladeshi stationery e-commerce store. If your WooCommerce site keeps hitting hosting limits or feels slow at checkout, my web development service covers this kind of audit and fix.

📊
Zass Tech service
GA4 & GTM Setup

Clean, accurate tracking infrastructure that reports numbers you can trust.

→

Found this useful?

Share it with someone who's fighting the same tracking headaches.

Shakh Farid

Written by

Shakh Farid

Founder, Zass Tech

More from Shakh →