WordPress 'Allowed Memory Size Exhausted' Fatal Error
Workaround available Self-hosted WordPress (WordPress.org) Updated November 13, 2026Based on 3 user reportsHow we research
Quick answer
PHP ran out of memory. Raise WP_MEMORY_LIMIT in wp-config.php, and if the host caps it, change memory_limit in PHP settings or find the plugin using too much.
Most likely fix: Raise WP_MEMORY_LIMIT
How to fix it
Try these in order — the most common fix is first.
1. Raise WP_MEMORY_LIMIT
- Add define('WP_MEMORY_LIMIT', '256M'); to wp-config.php above the stop-editing line.
Did this fix it?2. Raise the PHP limit
- In your host panel's PHP settings (for example MultiPHP INI Editor) set memory_limit to 256M, or ask support. WordPress cannot exceed the limit the server sets.
Did this fix it?3. Find the culprit
- Deactivate plugins and reactivate them one by one while repeating the action that failed. Check Tools > Site Health > Info for current memory values.
Did this fix it?4. Move to better hosting
- If you need more than 256M on every request for a basic site, the plugin stack or the host plan is too heavy.
Did this fix it?
Symptoms
Error reads 'Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate ...)' or you see a white screen during an import, backup or plugin install.
Why it happens
- Low memory_limit set by the host
- A heavy plugin such as a page builder, backup or importer
- Large image processing
- A plugin memory leak
This guide also covers
- wordpress allowed memory size exhausted
- wordpress memory limit
- wordpress fatal error memory size
Still not working?
If WordPress keeps failing, you're not alone. See every WordPress problem users report or the alternatives people switch to.
Done fighting WordPress? Our small team builds your own WordPress alternative, made for how you work. On your domain or hosted by us. Price agreed together.
Get a quoteThe same problem in other apps
All not loading, error messages & connection guides →
- Squarespace Domain Not Connecting (Squarespace)
- Wix Site Not Loading or Can't Be Reached (Wix)
Other WordPress errors
- WordPress White Screen of Death
- WordPress Error Establishing a Database Connection
- WordPress Critical Error: 'There Has Been a Critical Error on This Website'
- WordPress 500 Internal Server Error
- WordPress Too Many Redirects (ERR_TOO_MANY_REDIRECTS)
- WordPress Stuck in Maintenance Mode: 'Briefly Unavailable for Scheduled Maintenance'
- WordPress 'Updating Failed. The Response Is Not a Valid JSON Response'
- WordPress Posts Return 404 Not Found