admin管理员组文章数量:1122832
Hi I am a beginner at WordPress and am currently trying to increase my file upload size.
So far I've tried two ways:
The first way was to add this to the bottom of the functions.php file:
@ini_set( 'upload_max_filesize' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
That didn't seem to work.
The second way I tried was to install the PHP Settings plugin and add this to the file
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
However, when I try to verify that my change updated by clicking on Media > Add New
, I still see 8MB as the max file size:
How would I do this? I'm trying to upload a theme that's 8MB+ and it won't work because of this limitation.
P.S. I'm using MAMP to start my server.
Hi I am a beginner at WordPress and am currently trying to increase my file upload size.
So far I've tried two ways:
The first way was to add this to the bottom of the functions.php file:
@ini_set( 'upload_max_filesize' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
That didn't seem to work.
The second way I tried was to install the PHP Settings plugin and add this to the file
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
However, when I try to verify that my change updated by clicking on Media > Add New
, I still see 8MB as the max file size:
How would I do this? I'm trying to upload a theme that's 8MB+ and it won't work because of this limitation.
P.S. I'm using MAMP to start my server.
Share Improve this question asked Nov 30, 2018 at 21:36 bigpotatobigpotato 3352 gold badges6 silver badges16 bronze badges 1 |1 Answer
Reset to default 11] To do this, change the upload_max_filesize and post_max_size directives in your php.ini file. To ensure that file uploads work correctly, the post_max_size directive should be a little larger than the upload_max_filesize. For example, the following settings demonstrate how to set a file upload limit to 20 megabytes:
upload_max_filesize = 20M
post_max_size = 21M
2] You need to add the following codes at the bottom of the .htaccess file:
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300
ref links: https://kinsta.com/blog/wordpress-maximum-upload-file-size/ https://kinsta.com/blog/wordpress-maximum-upload-file-size/
本文标签: functionsMax file size not updating
版权声明:本文标题:functions - Max file size not updating 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736311356a1934709.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
php_value upload_max_filesize 30M
– JakeParis Commented Nov 30, 2018 at 21:42