Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase File Upload Size Wordpress / IIS 7

I'm trying to increase the file upload size in a Wordpress blog to allow an admin to post his e-books and large PDF files. The site is hosted on GoDaddy / IIS 7. I have tried the following with no luck: web.config: <configuration><system.webServer><security><requestFiltering><requestLimits maxAllowedContentLength="10000000"/></requestFiltering></security></system.webServer></configuration>

php.ini in root of site: upload_max_filesize = 64M

Any advice is greatly appreciated. Thanks, Shawn

like image 263
pharophy Avatar asked Feb 27 '13 03:02

pharophy


People also ask

How do I increase the maximum upload file size in WordPress?

Go to your WordPress Dashboard → Plugins → Add new, search “Increase Max Upload Filesize”, then Install and Activate 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.

How do I increase the size of an IIS file?

From the Actions pane on the right hand side of the screen click Edit Feature Settings... link. The Edit Request Filtering Settings window displays. In the Request Limits section, enter the appropriate Maximum allowed content length (Bytes) and then click the OK button.

What is the maximum upload size for WordPress?

To prevent users from causing server timeouts, the default maximum upload size in WordPress typically ranges from 4 MB to 128 MB. Usually, the hosting provider sets this limit at the server level. WordPress also includes constants that define this limit, but they cannot override the server-level settings in most cases.


1 Answers

Solution found here:

Step 1:

First, you need to edit your server’s PHP.ini file. This is found in your PHP installation directory, e.g. c:\program files\php\php.ini and set 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 to run up to 5 minutes before timing out.

Step 2:

Lastly, IIS 7 has a default file upload limit of 30MB. Anything larger than that will cause IIS to return a very unhelpful 404 status. You can read more about it at http://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 to be in bytes instead of kilobytes.) The following is some copypasta from the MSDN docs:

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

And that’s it!

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

like image 101
Amos Avatar answered Sep 19 '22 16:09

Amos