Portal Home > Knowledgebase > Apache and PHP > How to increase the size of uploaded files in PHP


How to increase the size of uploaded files in PHP




The standard maximum size of the file that you can upload in PHP is 2MB, but some scripts require an increase of this size.

Just create a file named php.ini in your computer and upload it to the folder of your web hosting, which you want to change the maximum size for:

upload_max_filesize = 10M
post_max_size = 20M

This will increase the maximum size of uploaded files in PHP from 2MB to 10MB. Note that post_max_size should be twice larger than upload_max_filesize.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
PHP version (Views: 6932)
What is the path to Perl (Views: 3932)

* Minimum sign up periods for cPanel Web Hosting plans: Mini - 3mo., Pro - 1mo., Biz - 1mo., cPanel Reseller Hosting, Linux VPS, Windows VPS, Managed cPanel VPS and Dedicated Servers - 1mo. secret link
Accepted payments: Credit/Debit Card, Paypal, Payza, Skrill, WebMoney, CashU, Ukash, paysafecard, Bitcoin, Perfect Money, SolidTrust Pay, OKPay, EgoPay, Western Union/MG, Wire Transfer and more.