PHP Fatal error: Out of memory (allocated 20185088) Print

  • PHP, SSH, memory_limit, memory limit, Increase PHP, WHM
  • 454

After installing/upgrading the WordPress the following error might occur:

PHP Fatal error: Out of memory (allocated 20185088) (tried to allocate 12288 bytes) in

/home/username/public_html/wp-content/plugins/wp-affiliateplatform/wp_aff_includes_3rd_party_integration.php

On line 300

This error occurred as your account exceeded the allocated memory, to solve this issue you should increase the memory_limit for this account.

How Can I Increase It By Using SSH?

Login to the server through SSH and then find the php.ini file on the server with the command mentioned below :

# php -i | grep php.ini

/usr/lib/php.ini

This command helps you to find the location of the php.ini file on the server. Open this file with your preferred editor.

# vi /usr/lib/php.ini

:/memory_limit

memory_limit=32M

Increased it to 64 or as per your requirement and save the file with ‘wq’

Restart the httpd service.

#/etc/init.d/httpd restart

How to Increase PHP memory limit in WHM?

Go to Service Configuration >> PHP Configuration Editor

Change the value from 32M to 64M or 128M on the memory_limit row.


Was this answer helpful?

« Back