Knowledgebase: PHP Questions
How do I increase the PHP Memory Limit?
Posted by Pacific Host, Last modified by Flora Lui on 11 July 2016 11:09 AM

Create a blank text file called php.ini (if one doesn't already exist).

Put the following line in it:
memory_limit = 16M

Replace 16M with the size in Megabytes you would like the limit set to.

Then place the file in your public_html folder (or deeper) and that's it.

You will then need to add these lines in entirety to a .htaccess file: (Please replace "yourusername" with your cpanel user name an add to the end of the command line the folder(s) to the location of the php.ini file - Also there is a space between path and /home)

<IfModule mod_suphp.c>

suPHP_ConfigPath /home/username/public_html

</IfModule>

Now your PHP memory_limit should be increased.

(1 vote(s))
Helpful
Not helpful

Comments (0)