How to change max file upload size in php ini Ubuntu

If your are working with apache ubuntu server and may face uploaded file exceeds the upload_max_filesize directive in php ini Ubuntu. So, in this tutorial, you will find the solution for how to change max upload size php ubuntu apache.

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

How to change/increase max file upload size in php ini Ubuntu

First of all, start your terminal or command prompt by pressing ctrl+r key.

Then run the following command on command prompt to open php.ini file for change max file upload size in php ini Ubuntu:

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

After that, find and set the following two values in php.ini file; 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.

Then run the following command into command prompt to restart apache web server; as follows:

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

Recommended PHP Tutorials

Leave a Comment