In this article I will show you how to change the maximum upload file size for PHP scripts by using the upload_max_filesize and post_max_size php directives.
CHANGING THE MAXIMUM UPLOAD FILE SIZE
By default, the maximum upload file size for PHP scripts is set to 128 M. However, you may want to change these limits. For example, you can set a lower limit to prevent users from uploading large files to your site. To do this, change the upload_max_filesize and post_max_size directives.
To ensure that file uploads work correctly, the post_max_size directive should be a little larger than the upload_max_filesize. For example, the following settings demonstrate how to set a file upload limit to 20 M in php.ini:
upload_max_filesize = 20M post_max_size = 21M