Knowledgebase: PHP
Increase PHP Memory Limit
Posted by Rick G. on 03 May 2015 10:37 AM

On occassion you may see a PHP memory allocation error.  This is due to a PHP script trying to use more memory than has been made available to PHP.

You can easily adjust your PHP Memory Limit by adding or modifying the following line in your .htaccess file.

php_value memory_limit 256M

Chaning the 256M to 512M or 768M would increase the amount of memory allocated to any PHP script in the directory and sub directories of the .htaccess file.

Split-Dedicated Server clients can also modify this and many other PHP configuration items at the server level by using the "PHP Config" utility located cPanel "Software -> PHP Config"and clicking "Modify Parameters" which will make changes directly to the servers php.ini file making the changes server wide.

(2 vote(s))
This article was helpful
This article was not helpful