增加wordpress中的最大上传限制 [英] increase max upload limit in wordpress

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

问题描述

我需要将PDF文件上传到我的 wordpress网站.当我转到上传新媒体并尝试上传时,它会显示

I need to upload a PDF file to my wordpress site. When I go to Upload New Media, and try uploading it, it says

FileName.pdf超出了此网站的最大上传大小.

FileName.pdf exceeds the maximum upload size for this site.

我尝试查找php.ini文件,但找不到它.我通过创建一个新文件然后在浏览器中打开它来运行phpinfo().

I tried looking for my php.ini file but could not find it. I ran phpinfo() by creating a new file and then opening it in my browser and found this.

Configuration File (php.ini) Path 
C:\Windows

Loaded Configuration File 
C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\php.ini

我用

upload_max_filesize = 512M
post_max_size = 512M
max_execution_time = 300

在wp-admin,httpdocs和我有访问权限的任何地方,均无效,最大上传文件大小仅为8 MB.请帮助我,我的客户需要上传该文件.

in wp-admin, httpdocs and everywhere I had access, nothing worked The max upload file size is just 8 MB. Please help me, My client needs to upload that file.

注意:请不要告诉我重新启动服务器,因为我不能这样做,它是一个托管站点.

Note: Please don't tell me to restart server, as I can't, It is a hosted site.

推荐答案

尝试以下插件:

<?php
/* Plugin Name: Increase Upload Limit */

add_filter( 'upload_size_limit', 'b5f_increase_upload' );

function b5f_increase_upload( $bytes )
{
    return 33554432; // 32 megabytes
}

我基于以下另一种选择是通过FTP上传并使用插件从服务器添加

Another option is upload via FTP and use the plugin Add from Server.

这篇关于增加wordpress中的最大上传限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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