2015-02-07 67 views
0

我买了一个模板2.2M和wordpress的限制设置为2M。WordPress的php.ini文件设置upload_max_filesize绕过2MB上传

我在托管服务器,因此我可以完全访问文件。

  1. 我创建了一个info.php的发现:
    加载的配置文件:无

  2. 然后设置php.ini中不工作:
    的php.ini //和php5.ini
    的upload_max_filesize = 32M 的post_max_size = 32M

  3. 而且试图设置:
    WP-CO nfig.php define('WP_MEMORY_LIMIT','64M');

  4. 也试过:
    没有.htaccess文件

    • php_value post_max_size要30M
    • php_value upload_max_filesize的30M

我应对该文件到服务器相与,但我好奇;
它必须是可能的,对吧?

+0

我的答案有效吗? – Skatox 2015-03-01 15:16:48

回答

3

如果你的主机,您可以上传自定义的php.ini文件,就在/可湿性粉剂管理员文件夹中创建它。

upload_max_filesize=280M ;Max file size 
max_execution_time=600 ; Script's max execution time, if it's short the file won't upload 
memory_limit=1024M ; Memory limit, mine is high because i execute some script when uploading 
post_max_size=280M ;Max POST size, it should be the same size as the file size limit 

然后在WP-Config中添加:

define(’WP_MEMORY_LIMIT’, ’64M’); 

我在多台服务器上测试这一点,如果它不工作,是因为你的托管块这个指令。

+1

非常感谢,花了整整一天的时间与此战斗。这工作! php.ini文件,只需在/ wp-admin文件夹中创建即可 – 2016-03-21 17:54:08

相关问题