解决wordpress安装插件时提示上传问价的尺寸超过php.ini中定义的upload_max_filesize值的问题(已解决)

本文介绍了解决WordPress在云服务器ECS上安装插件时遇到的上传文件大小限制问题。通过修改php.ini中的upload_max_filesize参数并重启服务器,或手动将插件ZIP包放置到/wp-content/plugins目录下进行本地安装的方法。

解决wordpress安装插件时提示上传问价的尺寸超过php.ini中定义的upload_max_filesize值的问题

上传文件的尺寸超过php.ini中定义的upload_max_filesize值
想使用markdown插件时文章排版更好,但是ftp服务器不会配置,主要用的是云服务器ECS,不是web服务器 哈哈.
解决办法是 直接vi /etc/php.ini
用 /upload_max_filesize 直接定位到该行 修改默认的2M 为比自己zip包大的数,重启机器.OK
不知道php.ini文件位置
find / -name php.ini

然后我知道安装插件吧

云服务器不行的嘛,对了,把zip包复制到/wp-content/plugins文件夹下,解压,然后在web界面就能看到了,启用,配置一下,enjoy

我在cpanel 多PHP编辑器里只有这些 display_errors This determines whether errors should be printed to the screen as part of the output or if they should be hidden from the user. 已禁用 max_execution_time This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser. This helps prevent poorly written scripts from tying up the server. The default setting is 30. 60 max_input_time This sets the maximum time in seconds a script is allowed to parse input data, like POST, GET and file uploads. 60 max_input_vars This sets the maximum number of input variables allowed per request and can be used to deter denial of service attacks involving hash collisions on the input variable names. 3000 memory_limit This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server. Note that to have no memory limit, set this directive to -1. 6000M post_max_size Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. Generally speaking, memory_limit should be larger than post_max_size. 1000M session.gc_maxlifetime This specifies the number of seconds after which data will be seen as "garbage" and potentially cleaned up. 1440 session.save_path session.save_path defines the argument which is passed to the save handler. If you choose the default files handler, this is the path where the files are created. /var/cpanel/php/sessions/ea-php74 upload_max_filesize The maximum size of an uploaded file. 1000M zlib.output_compression Whether to transparently compress pages. If this option is set to "On" in php.ini or the Apache configuration, pages are compressed if the browser sends an "Accept-Encoding: gzip" or "deflate" header. 已禁用
09-25
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值