PDA

View Full Version : To Increase the upload size in .htaccess



Mywebbee
05-16-2018, 05:46 AM
In an .htaccess file in the same directory as the script, include this line:

php_value upload_max_filesize

where is the size of the allowable upload. For example, if the desired filesize is 5 meg, the following directive would be placed in the .htaccess:

php_value upload_max_filesize 5M

If you get a 500 Error add this code inĀ your php.ini file and place it in your root folder

upload_max_filesize = 5M
post_max_size = 5M

then add this code in your .htaccess in your root folder

suPHP_ConfigPath /home/username/public_html
<Files php.ini>
order allow,deny
deny from all
</Files>


Happy Learning :cool:

dotzo.net
05-19-2018, 02:51 PM
Nice job, useful post

yuva12
07-03-2021, 05:07 AM
Log in to your account using SSH.
Use a text editor to add the following line to the .htaccess file. ...
Add the following line to the .htaccess file. ...
Save the changes to the .

hoststud
07-19-2021, 12:04 PM
If you are using cpanel then you can directly increase upload size from cpanel option MultiPHP INI Editor.
1. Login to cpanel
2. Click on MultiPHP INI Editor
3. Here choose required domain name and then enter the new limit of upload size.
4. After that click on Save changes.

These changes worked for me and that's why i am recommending this option.
You can get more details through this from here (https://hoststud.com/resources/how-to-edit-php-settings-in-multiphp-ini-editor-in-cpanel.557/).