Docker Community Forums

Share and learn in the Docker community.

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:

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

Go to your WordPress Dashboard → Plugins → Add new, search “Increase Max Upload Filesize” then activate and install the plugin. Once installed, go to plugin settings and simply enter the value for upload size. Click the Save Changes button to apply the new upload size.