How 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

AuthorAdmin

My name is Devendra Dode. I am a full-stack developer, entrepreneur, and owner of Tutsmake.com. I like writing tutorials and tips that can help other developers. I share tutorials of PHP, Python, Javascript, JQuery, Laravel, Livewire, Codeigniter, Node JS, Express JS, Vue JS, Angular JS, React Js, MySQL, MongoDB, REST APIs, Windows, Xampp, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL and Bootstrap from a starting stage. As well as demo example.

Leave a Reply

Your email address will not be published. Required fields are marked *