How to change the maximum upload file size for PHP scripts

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.

php.iniphp.ini wordpressupload max file size wordpress
Comments (0)
Add Comment