How to increase max upload file size limit PHP in Ubuntu

In this tutorial, i am going to show you how to increase or change max file upload size in PHP apache ubuntu server.

And using this tutorial, you can increase or set maximum file size allowed for upload 100, 250, 500 mb in PHP Ubuntu.

How to increase max upload file size limit PHP in Ubuntu

Start terminal and run following command on terminal to set or change max file upload size in php ini Ubuntu by edit the php.ini; as follows:

$ sudo vi /etc/php/7.0/apache2/php.ini

Then update the following two values; as follows:

post_max_size = 100M
upload_max_filesize = 100M

Save and close the file. Where,

  1. post_max_size = 100M :
  2. upload_max_filesize = 100M : Maximum allowed size for uploaded files.

Next, Run the following command into terminal to restart apache web server; as follows:

$ sudo service apache2 restart
OR
$ systemctl restart apache2.service

Recommended Ubuntu Apache Tutorials

Be First to Comment

Leave a Reply

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