在通过“添加媒体”上传doc和pdf附件的时候,提示“超过了站点的最大限制”:

the_file_name.pdf
the_file_name.pdf超过了站点的最大上传限制。
最大上传文件大小:2 MB。

当然,可以修改php.ini中的upload_max_filesize解决这个问题,比如改成20M或其他的值。

 
[shell]
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2M
[/shell]
在这里提到的网页中,有下面一段话:
[shell]
Warning, if you change upload_max_filesize, please note that both post_max_size and memory_limit directives may have to change too.
post_max_size缺省是8M。

; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; http://php.net/post-max-size
post_max_size = 8M
[/shell]
实际上,这个数据够了。我们修改upload_max_filesize是可以放宽上传的文件的大小,但仍然约束post的大小。比如上传一个pdf文件比较大,但这个文件本身并不会放到post中,不会导致post增大许多。

另一方面,如果是想放开真正的媒体文件之外的附件上传大小,则不建议修改php.ini这些配置,有另外一种方法。即直接把附件上传到htdocs/wordpress/uploads/的某个目录下,然后在post或page中直接链接即可。

memory_limit缺省是128M,足够了。
[shell]
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 128M
[/shell]
---------------------
作者:lazying_bird
来源:CSDN
原文:https://blog.csdn.net/a_flying_bird/article/details/51361058
版权声明:本文为博主原创文章,转载请附上博文链接!

1 对 “wordpress: 超过了站点的最大上传限制”的想法;

  1. Pinky's Celebrity Club is a very easy-to-use and powerful desktop software that will allow you to gain Instagram post likes, followers and comments completely organically! The way it works is you login via your Instagram account, set hashtags and enter your comments. The software will then search for all posts that have your hashtags and then like them, comment on them and follow the users (you can tell what the software should do: follow, comment or/and like posts). This is a great way to organically grow your Instagram followers. The software simply does what you would otherwise do manually, but on a complete autopilot (24/7). The software also has some delay settings to make sure that all of your activity looks natural.

    Try PINKY'S CELEBRITY CLUB INSTAGRAM BOT FOR REAL FOLLOWERS AND LIKES for free and see for yourself just how powerful and easy to use the Instagram software is!

    To learn more head to https://wowitloveithaveit.com/products/pinkys-celebrity-club-instagram-management-software

发表评论

邮箱地址不会被公开。 必填项已用*标注