Running a complex WooCommerce store requires a delicate balance between dynamic functionality and server performance. When you manage thousands of products, custom inventory relationships, or personalized user accounts, your server has to process heavy PHP and database queries on the fly.
Hostinger’s infrastructure utilizes LiteSpeed Web Server, which is incredibly fast out of the box. However, when the LiteSpeed Cache plugin interacts with a heavily customized WooCommerce build, it can inadvertently trigger resource exhaustion—pushing your Hostinger plan’s CPU or LVE (Lightweight Virtual Environment) limits to 100%.
The culprit is rarely a lack of server power; it is usually an endless loop of “cache misses” and aggressive purges. Here are the definitive best practices to optimize LiteSpeed Cache for a dynamic WooCommerce store on Hostinger.
1. Prevent the “Purge Storm” (Inventory Optimization)
For stores utilizing complex inventory logic—such as syncing stock across multiple grouped items or variations—the default LiteSpeed purge settings can be devastating.
If the cache is configured to purge every time a product’s stock quantity changes, a single purchase will trigger a massive, cascading cache purge across multiple products and their respective categories. This forces the server to continuously rebuild pages from scratch.
The Fix: Navigate to LiteSpeed Cache > Cache > WooCommerce in your WordPress dashboard.
- Change the product update interval setting to: Purge product and categories only when the stock status changes.
By tracking the status rather than the quantity, the cache is only invalidated when an item transitions from “In Stock” to “Out of Stock,” drastically reducing the background load on your CPU.
2. Configure Essential WooCommerce Exclusions
Caching dynamic pages like the cart or checkout will break user sessions and force continuous, conflicting rebuilds as LiteSpeed tries to generate static HTML for personalized data. You must explicitly tell LiteSpeed what to ignore.
Navigate to LiteSpeed Cache > Cache > Excludes and apply the following rules:
Exclude Core URIs: Ensure your checkout flow and account areas are completely bypassed (add one per line):
/cart/(and any custom localized slugs, e.g.,/carrito/)/checkout//my-account//logout/
Exclude Dynamic Query Strings: Prevent caching when these functional parameters are present in the URL:
add-to-cartremove_itemwc-ajax
Exclude Session Cookies: Ensure LiteSpeed bypasses the cache entirely when a shopper has an active session:
woocommerce_cart_hashwoocommerce_items_in_cartwp_woocommerce_session_
Note: Under the main Cache tab, verify that Cache Logged-in Users is set to OFF. Caching logged-in users forces the server to generate a unique, private cache for every customer, which will rapidly consume your allocated disk space and memory.
3. Tame the LiteSpeed Crawler (Low and Slow)
The LiteSpeed Crawler is a powerful tool for improving Core Web Vitals. It acts as an automated visitor, pre-building static HTML for obscure pages in the background so real customers never experience a slow Time to First Byte (TTFB).
However, running the crawler on its aggressive default settings can act like a self-inflicted DDoS attack, maxing out your Hostinger CPU limits. To safely pre-build the cache, throttle the crawler down.
Navigate to LiteSpeed Cache > Crawler > General Settings:
- Threads:
1(Crucial: Forces the crawler to process only one page at a time). - Server Load Limit:
1(A hard safety switch that pauses the crawler if server resources spike). - Run Duration:
400(The crawler works for roughly 6.5 minutes before pausing). - Interval Between Runs:
600(Enforces a 10-minute rest period).
These “low and slow” settings allow the crawler to gently chip away at uncached URLs overnight without disrupting live traffic.
4. Leverage Hostinger’s Object Cache
While LiteSpeed handles the frontend HTML caching, database queries are the true bottleneck for WooCommerce. Hostinger offers integrated Object Caching on its higher-tier and WooCommerce plans, which stores frequently accessed database queries in the server’s RAM.
The Fix:
- Log into your Hostinger hPanel.
- Navigate to WordPress > Overview.
- Locate the Object Cache toggle and switch it to ON.
- Inside your WordPress dashboard, go to LiteSpeed Cache > Cache > Object and ensure the connection is verified (Hostinger usually configures this automatically via Memcached or Redis).
Conclusion
By isolating dynamic pages, adjusting inventory purge rules, throttling the crawler, and enabling Object Cache, you transform LiteSpeed from a resource-hungry liability into a highly tuned asset. The result is a highly scalable WooCommerce store that fully leverages Hostinger’s infrastructure to deliver instant page loads and maximum conversion rates.