What the error means in plain English
PHP allocates a fixed maximum amount of RAM per request. When a plugin, theme, or WordPress core process tries to use more than that ceiling, PHP kills the request and writes "Allowed memory size of X bytes exhausted" to the log, and often to the screen.
The fix is to give PHP more headroom, and then find the plugin that's spending it.
Fix #1, Raise the WordPress memory limit
Edit wp-config.php via SFTP or your host file manager. Above the line that says "That's all, stop editing!" add:
define('WP_MEMORY_LIMIT', '256M'); define('WP_MAX_MEMORY_LIMIT', '512M');
Save. Reload the page. Most sites are fine at 256M. WooCommerce, LMS, or membership sites sometimes need 512M for admin operations.
Fix #2, When wp-config doesn't take effect
Some hosts cap PHP memory at the server level and ignore WP_MEMORY_LIMIT. If the error persists after step 1, try adding this to a .user.ini file (or php.ini) in your WordPress root:
memory_limit = 256M
Still stuck? On strict shared hosting you'll need to open a ticket asking the host to raise memory_limit for your account. Most reputable hosts will bump you to 256M without pushback.
Fix #3, Find the plugin eating memory
Install Query Monitor (free) and log in. On any slow admin page, expand the Query Monitor bar at the bottom → "Queries by Component". You'll see which plugin is running the heaviest queries.
Elementor, WPBakery, Yoast Premium, WooCommerce reports, and old backup plugins are frequent memory hogs. Replacing or updating one plugin often drops memory use by 40-60%.
When to call for help
If your memory ceiling is already 512M and you're still hitting the wall, you have either a rogue plugin in an infinite loop, corrupted transients, or a bloated database. All fixable, but faster with someone who's seen 100 of these.
We include memory tuning on every care plan. Book a rescue and we'll usually get the site stable in under 30 minutes.
Common questions
How do I fix "Allowed memory size exhausted" in WordPress?+
Add define('WP_MEMORY_LIMIT', '256M'); to wp-config.php above the "That's all, stop editing" line. If the error persists, raise memory_limit in .user.ini or php.ini, or ask your host to bump the server-level PHP memory limit for your account.
What's a safe PHP memory limit for WordPress?+
256M is comfortable for most sites in 2026. WooCommerce, LearnDash, and BuddyBoss/BuddyPress sites often need 512M for admin operations. Going above 512M usually means a plugin or theme is misbehaving, fix the leak instead of raising the ceiling.
Can too little PHP memory cause a white screen?+
Yes. When PHP runs out of memory mid-render, WordPress can't finish the page and returns a blank response. Enable WP_DEBUG_LOG and check /wp-content/debug.log, a memory exhausted line will be right there.
Does raising WP_MEMORY_LIMIT slow down the site?+
No. It only sets a ceiling, PHP uses what a script needs, not the full limit. The real performance question is what's using the memory. Query Monitor tells you exactly which plugin.
