What Is a WooCommerce Memory Exhausted Error?
Why This Happens
Every PHP process has a memory_limit setting capping how much RAM a single request can consume, as a safety measure against runaway scripts. WooCommerce's own baseline memory needs are modest, but stacking many active plugins, a large product catalog, or a genuinely memory-heavy one-off operation (bulk import/export, a complex report, a poorly optimized custom query) can push a request over whatever limit is currently configured.
Common Causes
- A default memory limit too low for a WooCommerce site with a reasonably active plugin stack — WooCommerce's own documentation recommends at least 256MB, and some hosts default to considerably less.
- A large bulk operation (product import/export, a database cleanup script, generating a large report) that's inherently more memory-intensive than typical page loads.
- A poorly optimized plugin or custom query loading far more data into memory than actually needed for the task at hand, which is worth identifying rather than just compensating for with a higher limit.
- A genuine memory leak in a specific plugin, in rarer cases, where memory usage climbs unexpectedly over the course of a long-running process rather than being proportional to the actual work being done.
How to Fix It
- Raise the PHP memory limit (via
wp-config.php'sWP_MEMORY_LIMIT, or the host's PHP configuration) to at least WooCommerce's recommended minimum as an immediate fix. - If the error recurs even after raising the limit, that points to something genuinely memory-intensive worth investigating rather than a simple threshold issue.
- Use a profiling tool (like Query Monitor) to identify which specific plugin or operation is consuming the most memory during the failing request.
- Break up very large bulk operations into smaller batches if a specific import/export process is the recurring cause.
Need help identifying what's actually consuming excessive memory? See WordPress speed optimization.
Go deeper
- Full diagnostic guide: WordPress Showing “Allowed Memory Size Exhausted”? Here's What's Actually Wrong. — the step-by-step version of this problem, with the likely causes in the order worth checking.