如何在 Wordpress 中增加最大文件上传? [英] How can I increase max file upload in Wordpress?

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

问题描述

我在 php.ini 中设置

I set in php.ini

upload_max_filesize = 64M
post_max_size = 64M

然后尝试.htaccess文件

Then try .htaccess file

php_value  upload_max_filesize  64M
php_value  post_max_size  64M

在 wp-config.php define('WP_MEMORY_LIMIT', '64M'); 但没有任何帮助.最大上传大小还剩 32px;

And in wp-config.php define('WP_MEMORY_LIMIT', '64M'); But nothing helps me. The max upload size left 32px;

如何提高 Wordpress 的最大文件上传量?

How can I increase max file upload in Wordpress?

推荐答案

之前在 之后添加 define('WP_MEMORY_LIMIT', '64M');在 wp-config.php 上总是对我有用.对于最新的 wordpress 版本,它不起作用.我不知道它背后的实际原因,但它仍然适用于我去年从未更新过的旧 wordpress 网站.

Earlier adding define('WP_MEMORY_LIMIT', '64M'); just after <?php on wp-config.php always worked for me. For the latest wordpress version it isn't working. I don't know the actual reason behind it but it still works for my older wordpress sites which I never updated from last year.

按照以下步骤获取最新的 Wordpress:

Follow these steps for latest Wordpress:

1) 把它放在你的 php.ini 的末尾

1) Put this at the end of your php.ini

upload_max_filesize = 512M
post_max_size = 512M
max_execution_time = 300

2) 重启apache(重启apache后设置生效)

2) Restart apache(Setting won't take effect until apache is restarted)

经过测试和工作.

我也尝试了 .htaccessphp.ini on wp-admin 方法,他们也不工作.

I tried both .htaccess and and php.ini on wp-admin methods as well, They aren't working either.

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

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