![](/img/trans.png)
[英]upload_max_filesize changed in php.ini file, but ini_get still shows 2M
[英]Wordpress php.ini file to set upload_max_filesize to get around 2MB upload
我買了一個2.2M的模板,wordpress的限制設置為2M。
我托管服務器,因此可以完全訪問文件。
我創建了一個info.php並發現:
加載的配置文件:無
然后設置php.ini不起作用:
php.ini //和php5.ini
upload_max_filesize = 32M post_max_size = 32M
還嘗試設置:
wp-config.php define('WP_MEMORY_LIMIT','64M');
還嘗試了:
沒有.htaccess文件
我將文件處理到服務器,但是很好奇。
一定有可能吧?
如果您的托管允許您上傳自定義php.ini文件,只需在/ wp-admin文件夾中創建它即可。
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’);
我已經在多台服務器上對此進行了測試,如果它不起作用是因為您的主機阻止了該指令。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.