How to change the maximum upload file size for PHP scripts

Maximum upload file size is determined by 2 settings in php.ini file. They are upload_max_filesize and post_max_size.

By default, these 2 settings are set as 2MB for upload_max_filesize and 8MB for post_max_size. We can change these values to any bigger ones if you want to allow bigger upload file size.

upload_max_filesize = 40M
post_max_size = 41M

To make sure that file uploads work properly, the post_max_size setting should be a little larger than the upload_max_filesize.

Leave a Comment

Your email address will not be published. Required fields are marked *

We care about your privacy and data security. Google serves cookies to analyse traffic and show ads on this site. By using this site you agree to these cookies being set. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close