If you see a message like:
Fatal error: Allowed memory size of XXX bytes exhausted…
while syncing your WooCommerce store, it means your site’s PHP memory limit is too low.
PHP memory is the amount of server memory allocated to run WordPress and its plugins, like WooCommerce and Printful. When syncing large product catalogs or high-resolution mockups, the process can exceed this limit, leading to a failed sync and this error.
How to solve this
Here are reliable ways to increase your WordPress PHP memory limit and resolve the issue:
1. Increase memory via wp-config.php
Add this line above /* That’s all, stop editing! Happy publishing. */:
sql
CopyEdit
define('WP_MEMORY_LIMIT', '256M');
This lets WordPress use up to 256MB. If needed, you can increase it to 512MB depending on your hosting provider’s limits.
2. Adjust the php.ini file (if you have access)
Find (or create) the php.ini file and adjust:
ini
CopyEdit
memory_limit = 256M
For larger imports or syncing, some sites require 512MB or more.
3. Use .htaccess overrides (when php.ini access is unavailable)
Add this line to your site’s .htaccess file in the WordPress root:
nginx
CopyEdit
php_value memory_limit 256M
Save and retry your sync.
4. Contact your hosting provider
If the methods above don’t work, your hosting provider may be enforcing a lower PHP memory limit that overrides your changes. Many hosts offer a built-in option in their dashboard (like cPanel or hPanel) to increase memory manually. If not, reach out to their support team; they’ll be able to review your server configuration and help raise the limit.
Tips & best practices
- WooCommerce minimum: WooCommerce recommends at least 64MB, but 128MB is better. Most stores run more smoothly with 256MB+ for syncing and large imports.
- Check memory usage: Under Tools → Site Health → Info, look for the PHP memory limit value. In WooCommerce → Status you can see what WordPress is capped at.
- Avoid memory limit misuse: Some plugins or themes may cause excessive memory use; review admin logs or disable plugins temporarily if memory spikes persist.
- Special cases: Setting memory_limit = -1 in php.ini indicates no memory cap. Some plugins or WooCommerce versions may interpret this incorrectly. Verifying with a fixed large limit (e.g., 512M) may resolve compatibility issues.
If you’ve tried the steps above and the error persists, we recommend contacting your hosting provider. Let them know you’re experiencing memory exhaustion errors when syncing your WooCommerce store, and share the troubleshooting steps you’ve already taken. They’ll be able to review and adjust your server settings if needed.