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

This can be done with the php.ini file. Here is how you do it:

Create a file under public_html and name it php.ini (if you do not have one yet.) Put the following in it:

upload_max_filesize = 5M

post_max_size = 5M

Replace the 5 with 20 or less. If you are letting other people upload, a size cap protects your storage space from abuse/overuse.

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


Now your PHP upload limit should be increased.

(2 vote(s))
Not helpful

Comments (0)