December 15, 2019

How to change the maximum upload file size for PHP scripts

In this article i will be taking about php upload file size, many of user face this problem and don’t know how to increase the upload_max_filesize. By default php will restrict you to a maximum size of 2MB of upload file size.

So the question is how can we change the maximum upload size?

Its very simple, you just have to edit your php.ini file on your server, this file basically resides in /etc directory.

To do so just open the php.ini file with your favourite editor and edit the following line as follows:-

; Maximum allowed size for uploaded files.

upload_max_filesize = 40M ;

Must be greater than or equal to upload_max_filesize post_max_size = 40M

After modifying php.ini file, you will need to restart your httpd/apache server to use new configuration.

Vedant Singh

Linux System Administrator | Entrepreneur | Founder Techmion. I have started my career as a Linux system Administrator after that quit my job to start something new that excites me and started a Tech Company in order to provide the best technology to my clients. My Company website link: https://www.techmion.com/ For Bulk, SMS-Marketing follows the link : https://www.pingsms.in/

View all posts by Vedant Singh →

Leave a Reply

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