What this problem looks like
WordPress default memory is often 40M, which is tight for WooCommerce and builders. WP_MEMORY_LIMIT asks PHP for more per request.
Raising memory treats the symptom. Bloated plugins or runaway queries still need investigation on busy sites.
Set memory in wp-config.php
WP_MEMORY_LIMIT applies to front-end requests. WP_MAX_MEMORY_LIMIT applies to admin tasks such as updates.
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );
Change PHP memory_limit in hosting
cPanel MultiPHP INI Editor and Plesk PHP settings control the server ceiling. WordPress cannot exceed php.ini memory_limit.
- Set memory_limit to 256M or 512M for builder sites.
- Restart PHP-FPM if the host requires it after INI changes.
Verify current limits
wp eval 'echo WP_MEMORY_LIMIT . "\n";'
php -i | grep memory_limit
When raising memory does not help
Infinite loops and broken queries still exhaust any limit. Enable WP_DEBUG_LOG and profile heavy plugins.
Consider object caching and disabling admin plugins you do not need during imports.
WooCommerce and import guidance
Product CSV imports and translation plugins often need 512M temporarily. Lower limits after the job completes if the host prefers it.
When to stop DIY and hire help
Chronic memory errors on production shops need code-level fixes, not only INI tweaks. BugShield diagnoses memory and performance issues at a confirmed fixed price.