Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

309
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda