Home / Questions / What does allowed memory size exhausted mean in WordPress?
What does allowed memory size exhausted mean in WordPress?
This error means a page or script needed more PHP memory than the limit allowed. Raise the limit in wp-config.php and find the plugin that uses the most memory.
“Allowed memory size of 40894464 bytes exhausted” means a script tried to use more PHP memory than the server allows, and it stopped. The error usually appears on heavy screens such as the editor, WooCommerce checkout or a big import.
Raise the limit
Add this line to wp-config.php, above the line that says “That’s all, stop editing”:
define( 'WP_MEMORY_LIMIT', '256M' );
Ready to act on this?
Get a written review of your site, or send us your question and we will reply within 24 hours.
Check the host limit
A value in wp-config cannot go above what the server allows. If the error stays, raise the memory limit in your hosting panel’s PHP settings too.
Find the cause
A higher limit only hides a heavy plugin for a while. Deactivate plugins you do not use, and check which one the debug log names.
If your site keeps running out of memory, see how we speed up slow WordPress sites or ask us to check it.
Related services
Related questions
Not sure where your site stands?
Send us the details and we will reply within 24 hours with a clear next step.