0

I have a WordPress image on Azure App Service. I installed WordPress directly from the docker hub. I didn't use Docker compose. The file size of the theme I will use is large. For this reason, I want to increase the WordPress file upload limit and time. But I don't know how to do this.

Can I do it by defining a value like WP_CONFIG_EXTRA?

burak ramazan
  • 146
  • 3
  • 15

1 Answers1

0

As per @F1Linux post,

Try to change the docker-compose.yml in the following way:

  • Create uploads.ini with below settings:
file_uploads = On  
memory_limit = 64M  
upload_max_filesize = 64M  
post_max_size = 64M  
max_execution_time = 600  
  • Create Dockerfile-php:
FROM wordpress:5.8.2  
COPY ./uploads.ini /usr/local/etc/php/conf.d  
  • Add build config of docker-compose.yml which refers Dockerfile-php which in turn refers uploads.ini:
wordpress:  
build:  
context: .  
dockerfile: Dockerfile-php  
depends_on:  
- db  
image: wordpress:5.8.2  
<snippity snip>  

Run the docker-compose directory with all files:

docker-compose down && docker-compose up -d --build  

(OR) Alternatively:

Modify the Network Admin Settings to increase the value.

  • Select Network Admin => Settings=> Scroll down to the Upload Setting section, modify the Max upload file size then press Save Changes.

Please refer Update PHP settings for more information.

RajkumarPalnati
  • 541
  • 2
  • 6