增加文件上传大小Wordpress/IIS 7 [英] Increase File Upload Size Wordpress / IIS 7

查看:85
本文介绍了增加文件上传大小Wordpress/IIS 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试增加Wordpress博客中的文件上传大小,以允许管理员发布其电子书和大型PDF文件.该站点托管在GoDaddy/IIS 7上. web.config: <configuration><system.webServer><security><requestFiltering><requestLimits maxAllowedContentLength="10000000"/></requestFiltering></security></system.webServer></configuration>

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: upload_max_filesize = 64M

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

任何建议都将不胜感激. 谢谢, 肖恩

Any advice is greatly appreciated. Thanks, Shawn

推荐答案

在这里找到解决方案:

第1步:

首先,您需要编辑服务器的PHP.ini文件.可在以下位置找到 您的PHP安装目录,例如c:\ program files \ php \ php.ini和 设置以下值:

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

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

这允许PHP处理最大为64MB的文件,并允许PHP脚本执行以下操作: 最多需要5分钟才能运行.

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

第2步:

最后,IIS 7的默认文件上传限制为30MB.任何更大的 否则将导致IIS返回非常无用的404状态.你 可以在下面阅读更多关于它的信息 http://www.iis.net/ConfigReference/system.webServer/security /requestFiltering/requestLimits

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

要覆盖此设置,您需要更改以下内容的web.config设置 (每个)网站. (这里唯一要注意的是,预期限制会达到 以字节而不是千字节为单位.)以下是一些copypasta 来自MSDN文档:

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:

别忘了回收您的应用程序池,以便IIS接您 PHP.ini更改.

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

就是这样!

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

这篇关于增加文件上传大小Wordpress/IIS 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆