WordPress 'Allowed Memory Size Exhausted' Fatal Error

Share
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. 1. Raise WP_MEMORY_LIMIT

    1. Add define('WP_MEMORY_LIMIT', '256M'); to wp-config.php above the stop-editing line.
    Did this fix it?
  2. 2. Raise the PHP limit

    1. 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. 3. Find the culprit

    1. 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. 4. Move to better hosting

    1. 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 quote
Fixed it? Share this guide

The same problem in other apps

All not loading, error messages & connection guides →

Other WordPress errors

All 11 WordPress errors and fixes →