Back to Top

How to Increase the PHP Max Upload File Size

PHP is a simple and powerful language with core features such powerful solution.upload file size limit is for limiting the client to upload the file size. Usually, the php.ini is used to set the maximum upload file size.

Sometimes, you need to upload a large file to your sites like audio or epub file and the default 8mb limit in the server isn’t enough to upload large files.So you can change your server limit from the php.ini file or directly by the .htaccess file.yes, .htaccess allowed you to increase my max upload file size limit.Using PHP file upload, you can control settings like file upload size, file transfer size etc.

You can increase file upload size from php.ini or from the .htaccess file by adding just three line of code.

  1. Upload_max_filesize – The maximum file size for uploading a file
  2. Memory_limit – This sets the maximum amount of memory in bytes.
  3. Post_max_size – Sets maximum size of the post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. If memory limit is enabled by your configure script, memory_limit also affects file uploading.

NOTE: memory_limit should be larger than post_max_size.

Method 1: php.ini File

If you have an access of php.ini file then you need to add/replace the following line of code into the php.ini file.

Save and close the file. Restart apache.You can change 32m to whatever max file size you want.

Method 2: .HTACCESS File

Next, if you don’t have an access of php.ini then you can modify file upload size from the .htaccess file by just adding the following line of code into .htaccess file.

You can use any of the above method to Increase the PHP Max Upload File Size.After modifying the above parameters in PHP.ini, restart your server and upload large files.

Must Read:

GoTo statement in PHP
Table layout using DIV tags
Facebook PageTab Popup

I hope you have enjoyed this tutorial. Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Share:
Share on Facebook2

Share on LinkedIn0Tweet about this on TwitterShare on Google+0Buffer this pageDigg thisShare on Reddit0

Comments (1)

  1. That’s a sulbte way of thinking about it.

Leave a Reply

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

Most Popular Posts

GoTo statement in PHP

Posted on 5 years ago

Bhumi

What are Lambdas and Closures in PHP?

Posted on 4 months ago

Bhumi

New Features in MySQL 5.6

Posted on 5 years ago

Bhumi

JavaScript Ticker for Database Values

Posted on 5 years ago

Bhumi

MySQL coalesce() function

Updated 17 years ago

Bhumi

How to use JavaScript Promise API?

Updated 17 years ago

Bhumi

What are Lambdas and Closures in PHP?

Updated 17 years ago

Bhumi

An Introduction to Gulp JS

Updated 2 months ago

Bhumi

The Reader’s Poll – June 2015

Posted on 2 years ago

Bhumi

The Reader’s Poll – August 2014

Posted on 3 years ago

Bhumi

The Reader’s Poll – June 2014

Posted on 3 years ago

Bhumi

The Readers’ Poll – May 2014

Posted on 3 years ago

Bhumi

The Readers’ Poll – August 2013

Posted on 4 years ago

Bhumi