can any one tell me how to change the maximum file upload size?

upload_max_filesize

i got ini_set('max_upload_filesize', 8388608); for setting it to 8M
but i need to know where to change it, I mean where is the php.ini file is located in my remote folder!

i also tried to edit .htaccess
like this

php_value upload_max_filesize 100M;
php_value post_max_size 100M;

but after that i can't open any page in my site, im getting an error message ie error 500.

Thanks in advance.

Recommended Answers

All 3 Replies

Do you know if the PHP is set up at CGI or Apache Module?

You should be able to create a file php.ini in any folder that you wish to change the upload size in if there is not already one there. So if you want it in three folders, say the root, and two subfolders (/coffee and /cream).

You would need to create a php.ini file in

/php.ini
/coffee/php.ini
/cream/php.ini

All three of these could be the exact same with just the size change if there are no other rules you wish to apply.

Thanks a lot BrettH, (i don't know your actual name)

IT worked i made php.in in my root folder.

upload_max_filesize = 8M

now it is showing max upload size 8m in phpinfo.php.

thanks a lot again may I think your reply will be very usefull many beginners in Daniweb :)

I was facing the same problem so I tried different way like attempted to change my limit directly on my server, then in the .htaccess file and then in wp-config.php

1. change my limit directly on my server
2. through the .htaccess file 
3. wp-config.php 

but neither change none of these changes worked for me. Then I came across this little snippet http://eaziweb.blogspot.com/2013/08/increase-max-upload-file-size-in.html help me sort the issue a post somewhere That I summarised in a blog post(find below)

All you need to do is 
1. create a php.ini 
2. upload to admin directory

Your Php.ini may contain following or whatever limit you need

 memory_limit = 32M
upload_max_filesize = 32M
post_max_size = 32M
file_uploads = On

Thanks here is a link if you want to know more http://ecarobar.com/increase-max-upload-file-size-in-wordpress/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.