free stats

How to change the maximum files upload limit in PHP

Last Update : 13 Dec, 2022 How to Guide in PHP

In this article, you will learn to change PHP's maximum file upload limit.

When you are developing a PHP bases application, sometimes you need to upload files through the forms in your application. Also, by default, you can upload 20 files via a single request. But, when you work with more than 20 files, PHP does not allow you to upload them.

If you want to upload more than 20 files.  You must increase the maximum number of files to upload.  Then you can modify the max_file_uploads variable value in the php.ini file.

The max_file_uploads variable holds the value of the maximum number of files that can be uploaded via a single request.


You can change this variable by following the steps.

  1. Find and open the php.ini file.
  2. Open the php.ini file in a text editor.
  3. Search for the max_file_uploads variable.
  4. Change the upload count as per your need.




You found this tutorial / article valuable? Need to show your appreciation? Here are some options:

01. Spread the word! Use following buttons to share this tutorial / article link on your favorite social media sites.

02. Follow us on Twitter, GitHub ,and Facebook.