Increase Upload File Size Limit PHP on Ubuntu 22.04 Example

Jul 16, 2022

.

Admin

Increase Upload File Size Limit PHP on Ubuntu 22.04 Example

Hi Guys,

I am going to show you example of Ubuntu 22.04 on PHP Max File Upload Size. Here you will learn Using Commands to Upload File Size Limit PHP on Ubuntu 22.04. you will learn Step by Step to Max File Upload Size in Ubuntu 22.04. This post will give you simple example of How to Increase Upload File Size Limit PHP in 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

OR

$ systemctl restart apache2.service

#Ubuntu