How to increase and set upload size to 100MB in PHP-Apache

https‮:‬//www.lautturi.com
How to increase and set upload size to 100MB in PHP-Apache

To increase the upload size in PHP and Apache, you can follow these steps:

  1. Find the php.ini file on your server. This file controls many PHP settings, including the maximum file upload size.

  2. Edit the php.ini file and set the following values:

upload_max_filesize = 100M
post_max_size = 100M

These values control the maximum size of uploaded files and the maximum size of POST data, respectively. By setting them to 100M, you are allowing files up to 100MB to be uploaded.

  1. Save the php.ini file and restart the Apache server for the changes to take effect.

  2. If you don't have access to the php.ini file, or if you are using shared hosting, you can also set these values in an .htaccess file. To do this, create a new .htaccess file in the root directory of your website and add the following lines:

php_value upload_max_filesize 100M
php_value post_max_size 100M

Again, save the file and restart the Apache server for the changes to take effect.

Created Time:2017-10-28 21:39:03  Author:lautturi