Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set upload_max_filesize in .htaccess?

Tags:

php

.htaccess

I have try to put theese 2 lines

php_value post_max_size 30M php_value upload_max_filesize 30M 

in my root .htaccess file but that brings me "internal server error" message ...
php5 is running on the server
I don't have access to php.ini so i think htaccess is my only chance.
Can you tell me where is the mistake?
Thanks in advance

like image 505
T1000 Avatar asked Jun 07 '10 19:06

T1000


People also ask

What is upload_max_filesize?

upload_max_filesize is the maximum size of an uploaded file. This is the limit for a SINGLE file. post_max_size, on the other hand, is the limit of the entire body of the request (which may include multiple files as well as other stuff).

How do I set upload limits in WordPress?

Go to your WordPress Dashboard → Plugins → Add new, search “Increase Max Upload Filesize” then activate and install the plugin. Once installed, go to plugin settings and simply enter the value for upload size. Click the Save Changes button to apply the new upload size.


1 Answers

php_value upload_max_filesize 30M is correct.

You will have to contact your hosters -- some don't allow you to change values in php.ini

like image 56
Kerry Jones Avatar answered Sep 20 '22 14:09

Kerry Jones