How to increase file upload size in php.

From time to time we get a request about increasing the PHP file upload limit.  The system is set to allow a maximum of 2MB to upload through a browser, but some scripts (especially CMS scripts) are requiring users to increase the upload sizes directly in a custom php.ini file rather than through a normal FTP upload.

 

Just create a file called "php.ini" on your computer and put the following two lines in the file and then upload to your public_html folder:

upload_max_filesize = 10M
post_max_size = 20M

 

This will increase the file size from the default 2MB to 10MB.  Note that the "post_max_size" should be DOUBLE whatever the maximum upload size you want to allow.

If you require IonCube to also run on your site, you must add the the settings for IonCube at the BOTTOM of the php.ini file also.  You can read more about the IonCube settings here https://portal.my-tss.com/knowledgebase/327/Add-IonCube-to-a-custom-phpini-PHP-53plus.html

  • Email, SSL
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

Do you offer web hosting with PHP4 or PHP5?

PHP4 has reached an "end of life" status with the developers and as such Total Server Solutions...

What version of PHP do I have?

This can be found in your cpanel on the left column near where the server status link is. You can...

Can I run PHP scripts anywhere on my hosting account?

Yes, PHP scripts do not have to reside in a particular directory and will run anywhere on your...

Can I use short tags in my PHP scripts?

Yes, we have installed PHP to support short tags, so you can use this feature in your PHP scripts.

What is PHP?

PHP is a server-side, cross-platform, HTML embedded scripting language. It has a syntax familiar...