By default, PHP allows uploading maximum 2 MB file on the server. But you can change the maximum size of file upload as per your requirement. Using the PHP configuration file (php.ini
), you can increase or decrease the file upload size in PHP.
The upload_max_filesize and post_max_size variable’s value need to be modified in php.ini
file. Follow the below steps to increase the limit of file upload size in PHP.
upload_max_filesize = 128M
upload_max_filesize
variable value)
post_max_size = 128M
Hi! This is very helpful but how do I restart the server?
Thank you for this!
Hi Sir,
Your tricks worked very well on my website. I am forced to upload maximum 2 mB file but using this method now i am able to upload much more size. Thanks a lot