Introduction

A PHP memory exhausted error on WordPress hosting means the account is hitting the real runtime limit that PHP is allowed to use, not just the value you hoped was active. On shared and managed hosting, the visible setting in one file may not be the setting that actually wins. The reliable fix is to confirm the effective limit, then identify whether a plugin, theme, import task, or host-level restriction is driving memory use above that ceiling.

Symptoms

  • WordPress shows Allowed memory size exhausted during admin actions or page loads
  • Plugin updates, backups, imports, or builders fail more often than simple page requests
  • The site works until a specific workflow runs, then crashes with a fatal error
  • Changing memory_limit in one config file does not resolve the problem
  • Hosting dashboards and phpinfo() appear to disagree about the active PHP limit

Common Causes

  • The hosting account enforces a lower PHP memory limit than the application expects
  • A heavy plugin, builder, import, or image-processing task spikes memory usage
  • Multiple PHP configuration locations exist and the change was applied to the wrong one
  • Background jobs or cron tasks consume memory outside the main page request you tested
  • The site is running an outdated plugin or theme with an inefficient query or loop

Step-by-Step Fix

  1. Capture the exact fatal error and confirm which workflow triggers it so you are fixing the real path, not a random page that happens to load.
  2. Verify the effective PHP memory_limit in the running environment instead of assuming the value in wp-config.php, .user.ini, or the control panel is the one being used.
  3. Raise the memory limit in the correct location supported by the host, then confirm the new value is truly active before testing again.
  4. If the limit will not change, check the hosting plan or provider policy for account-level caps that override application settings.
  5. Disable or isolate the plugin, theme, import, or scheduled job that triggers the spike and retest the same workflow.
  6. Review recent updates, large media operations, backup tools, and page builders, because those often turn a stable site into a memory-heavy one overnight.
  7. Check PHP version and plugin compatibility so you are not chasing a memory symptom caused by an outdated component.
  8. Retest the failing action after each change and watch logs so you can see whether the limit increased enough or whether memory use is still growing abnormally.
  9. If the site legitimately needs more resources than the account provides, move the workload to a hosting tier that supports the real runtime demand instead of forcing unstable workarounds.