mkdir /data
mkdir /data/temp
#wordpress是容器名
sudo docker cp /data/temp wordpress:/usr/local/etc/php
ls /data/temp/php
#会展示三个:conf.d php.ini-development php.ini-production
#新建配置文件uploads.ini
sudo vim /data/temp/php/conf.d/uploads.ini
#写入配置
file_uploads = On
memory_limit = 64M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 600
:wq
#写回容器
sudo docker cp /data/temp/php/conf.d/uploads.ini wordpress:/usr/local/etc/php/conf.d/uploads.ini
#重启容器 over
#不放心可以进容器看看放进去了没有
docker exec -it wordpress /bin/bash
cd /usr/local/etc/php/conf.d
cat uploads.ini
ps:不知道历史原因还是,我试过什么根目录php.ini html\wp-admin\php.ini 还有什么改wp-config.php,都是扯淡。。。