Friday, September 5, 2025
HomeLanguagesHow to increase upload file size limit PHP in Ubuntu

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

Recommended Ubuntu Apache Tutorials

RELATED ARTICLES

Most Popular

Dominic
32264 POSTS0 COMMENTS
Milvus
81 POSTS0 COMMENTS
Nango Kala
6634 POSTS0 COMMENTS
Nicole Veronica
11801 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11863 POSTS0 COMMENTS
Shaida Kate Naidoo
6752 POSTS0 COMMENTS
Ted Musemwa
7025 POSTS0 COMMENTS
Thapelo Manthata
6701 POSTS0 COMMENTS
Umr Jansen
6718 POSTS0 COMMENTS