I dont know how to update big files on wordpress? I need to update the limits of nginx and wordpress upload limits.
Best solution is two step update on configuration files
1.Step is update configuration file for nginx image such as client_max_body_size.conf and remount the nginx container
docker stop <nginx-container-name>
create a configuration file as above
nano client_max_body_size.conf
then add below configuration info
client_max_body_size 25m;
and save and exit the file. Then run the below script
docker run -d --name nginx-proxy -v /var/run/docker.sock:/tmp/docker.sock \
-v <path>/client_max_body_size.conf:/etc/nginx/conf.d/client_max_body_size.conf:ro \
-p 80:80 jwilder/nginx-proxy
This code mount the container with new upload limits.
2. Step is to change the upload limits of wordpress as given below;
sudo docker container exec -it <CONTAINER ID ?> bash
nano /var/www/html/.htaccess
Then add below parameters inside between BEGIN WordPress and END WordPress tags
php_value memory_limit 256M
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 1000
After these updates, save and exit from this file. exit the container by using exit command. Then restart the container.
docker restart <docker name?>
Note: generally nano may not be installed on docker wordpress image before so you can use below codes in sequence to install nano on image.
sudo docker container exec -it <CONTAINER ID ?> bash
After this step you can install as;
apt-get update
apt-get install nano
then exit the container.
Alternative solution can be, after installing nano;
sudo docker container exec -it <CONTAINER_NAME> bash -c "nano /usr/local/etc/php/conf.d/uploads/ini"
then put below info and save exit. Then restart the container.
file_uploads = On
upload_max_filesize = 256M
post_max_size = 256M