wordpress 添加RAR附件的方法

1、首先打开站点根目录
然后打开根目录下的 wp-config.php 文件,在里面添加一行代码

define('ALLOW_UNFILTERED_UPLOADS', true);

2、打开wp-includes/functions.php,查找
'zip' => 'application/zip' 或者zip

3、如果你想上传扩展名为RAR的文件,就增加以下这行代码:
'zip' => 'application/zip',
下添加
'rar' => 'application/rar',

把文件都上传即可。

然后再编辑文章的时候,点击“添加媒体”,把文件上传即可,

wordpress添加RAR附件截图

wordpress添加RAR附件截图

看到下面的链接吧,把链接复制即可


Leave Your Comment

Your email will not be published or shared. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">

*
请输入图片中的字符以验证你并非垃圾机器人. 点击图片收听验证码的语音版.
点击这里收听此验证码的语音版本