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

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including 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. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

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