How to Increase or Change Max File Upload Size in Ubuntu 22.04?

Jul 16, 2022 . Admin

Hi Guys,

This article will give you example of Modify the PHP File Upload limit in Ubuntu 22.04. This article goes in detailed on Ubuntu 22.04 on Increase Upload File Size Limit in PHP. step by step explain Increase upload size in your php on Ubuntu 22.04. This post will give you simple example of Change Max File Upload Size in your php on Ubuntu 22.04.

You can use this post for ubuntu 14.04, ubuntu 16.04, ubuntu 18.4, ubuntu 20.04, ubuntu 21 and ubuntu 22.04 versions.

Step 1: Change Max File Upload Size

Execute the following command on terminal to set or change file upload size:

$ 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.

Step 2: Restart Apache server

Now, run the following command in Terminal to restart the Apache web server:

$ sudo service apache2 restart
$ systemctl restart apache2.service