PHP "Allowed memory size exhausted" error

For hosting customers · Updated 2026-10-29

On this page
  1. Symptoms
  2. Causes
  3. Fix
  4. Still not working?

PHP gives each request a maximum amount of memory (memory_limit). A page, import or plugin that needs more stops with this error. You can raise the limit yourself on the PHP page.

Symptoms

  • PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) on the Errors page or in ~/logs/php-errors.log. (134217728 bytes = 128 MB.)
  • A 500 error, a WordPress "critical error" or a blank page, often only on big pages, imports or the admin area.

Causes

  1. The PHP memory limit is too low for the application (shops, page builders and imports need more).
  2. A plugin or script uses far too much memory — a loop, or loading a huge file or table at once.
  3. The account's own memory limit is reached (set by your plan), even though PHP's limit is higher.

Fix

1. Raise the PHP memory limit

  1. Open PHP (section Advanced).
  2. Under PHP settings, enter a value in Memory limit (MB), for example 256 or 512 (allowed: 32 to 2048). Or click a Ready-made button: WordPress (256 MB) or WooCommerce / large shop (512 MB).
  3. Click Save settings.

The setting applies to all websites of your account from their next request.

Note: values saved on the PHP page take priority over php_value memory_limit lines in a site's .htaccess. A WordPress setting such as WP_MEMORY_LIMIT cannot go above the PHP limit.

2. A script uses too much

If the error stays at any limit (the "tried to allocate" amount is small and the allowed size is already large), the code is the problem. The error line names the file: update or replace that plugin, or split the import into smaller parts.

3. The account's memory limit

Your plan also limits the memory of all your account's processes together. When it is reached, the biggest process is stopped — visitors then get an error even with a high PHP limit.

  1. Open Resource Usage (section Advanced).
  2. Under Server resources, check Memory and the Limits reached column ("3× memory").

Raising Memory limit (MB) above your plan's memory does not help. Lower it again, find the heavy page or cron job, or ask your host for a bigger plan.

Still not working?

  • Check that you saved the setting for the right account: the PHP page applies to every website of the account you are signed in to.
  • If your host has turned on the AI assistant, click Explain with AI on the Errors page.
  • Contact your host through Support with the error line.
Was this article helpful?

Still stuck?

Ask the AI about your exact situation — it answers from this knowledge base — or contact us.