Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

308
Views
Change Docker nginx and Wordpress Upload Limits

I dont know how to update big files on wordpress? I need to update the limits of nginx and wordpress upload limits.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

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
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!