Fix the "Allowed memory size exhausted" error Print

  • PHP, memory_limit, Fehler
  • 0

The message Fatal error: Allowed memory size of 134217728 bytes exhausted means a PHP script needs more memory than memory_limit allows. The number is the current limit in bytes (here 128 MB).

Raise the limit in cPanel

  1. Log in at https://cpanel.hoston.ch.
  2. Open Software > Select PHP Version and switch to the Options tab.
  3. Choose a higher value for memory_limit, e.g. 256M or 512M.
  4. Reload the affected page.

Additionally for WordPress

WordPress sets its own limit. In the file wp-config.php, add the following line above /* That's all, stop editing! */:

define('WP_MEMORY_LIMIT', '256M');

If the error persists

  • Check whether a lower value is set in a .htaccess or .user.ini file.
  • Temporarily disable plugins or extensions; often a single faulty plugin causes the high usage.
  • A higher limit is only possible within your package's resources. Check under Metrics > Resource Usage whether the account is reaching its limits.

If this does not help, open a ticket in the Client Area and include the full error message.


Was this answer helpful?

« Back

Powered by WHMCompleteSolution