How to increase upload file size limit PHP in Ubuntu
Php 19-Apr-2022

How to increase upload file size limit PHP in Ubuntu

To increase max file upload size in php apache ubuntu; Through this tutorial, we will learn how to increase or change max file upload size in PHP apache ubuntu server.

How to change max file upload size in php ini Ubuntu

Open your terminal and execute 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 find and set 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.

Restart Apache server

Now, execute the following command into terminal to restart apache web server; as follows:

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