Increase Upload Size in Official Wordpress Image

The default official Wordpress Image has a 2MB upload. So I added in uploads.ini which has the following:

file_uploads = On
memory_limit = 500M
upload_max_filesize = 500M
post_max_size = 500M
max_execution_time = 600

Wordpress then recognizes the larger upload size. But if I try to upload anything greater than 2MB (audio, images) it fails. And if I make a small file size image but greater than 2500px, it also fails.

Is there something that also needs to be changed on Apache or elsewhere in the container? I’ve spent essentially all day today (>5 hours) trying to figure this out and it SHOULD work with the uploads.ini, but it doesn’t…

The question is where you added the uploads.ini. You should add it to your wordpress service in docker compose or run statement like this:

volumes: 
   - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini

Hey - so 5 years late but better late than never.

The reason the image fails is probably because you are not properly setting up a persistent volume with your application.

Anyone having the same problem check:

The example given is precisely how to set up the config