Increase File Upload Size Wordpress / IIS 7 Increase File Upload Size Wordpress / IIS 7 wordpress wordpress

Increase File Upload Size Wordpress / IIS 7


Solution found here:

Step 1:

First, you need to edit your server’s PHP.ini file. This is found inyour PHP installation directory, e.g. c:\program files\php\php.ini andset the following values:

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
max_input_time = 300

This allows PHP to handle files up to 64MB and allows PHP scripts torun up to 5 minutes before timing out.

Step 2:

Lastly, IIS 7 has a default file upload limit of 30MB. Anything largerthan that will cause IIS to return a very unhelpful 404 status. Youcan read more about it athttp://www.iis.net/ConfigReference/system.webServer/security/requestFiltering/requestLimits

To override this, you need to change the web.config settings for(each) site. (The only catch here is that the limits are expected tobe in bytes instead of kilobytes.) The following is some copypastafrom the MSDN docs:

Don’t forget to recycle your application pool so IIS picks up yourPHP.ini changes.

And that’s it!

http://refactored.tumblr.com/post/4609761388/wordpress-iis7-uploads


you will have to modify the active php.ini which you can get get from a phpinfo() and change both post_max_size and upload_max_filesize accordingly. Once done, restart iis


I had to adapt the first solution above, because I am using Windows Share HostGator site. I had a file in httpdocs called: .user.ini, which I added:

upload_max_filesize = 256Mpost_max_size = 256Mmax_execution_time = 600max_input_time = 600

Because I needed it bigger. I also added:

<security><requestFiltering><requestLimits maxAllowedContentLength="268435456"/> </requestFiltering></security>

So this allowed me upload larger files. I wanted to be able to upload large videos or mp3 files.