Increase php.ini Upload Limit

From Lunarpages Web Hosting Wiki

Jump to: navigation, search

How can you increase the PHP upload limit?

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 this line to a .htaccess file: (Please replace "yourusername" with your cpanel user name an add to the end of the comand line the folder(s) to the location of the php.ini file - Also there is a space between path and /home)

suPHP_ConfigPath /home/Yourusername/public_html

Now your PHP upload limit should be increased.

Want to read this in another language?

Lunarpages Deal: Save $72 on your next Business web hosting plan! Starting at $18.95 per month, this an offer you can't miss. Perfect for business and e-commerce hosting sites, comes with free e-commerce tools and a TremenDesk Help Desk. Limited time offer!