Scott Robinson Technical Lead

Wordpress Docker - How to set memory_limit, max_upload_size and other resource limits

To set max_upload_size and post_max_size to set in the official docker image, open a bash session and run:

root@f125876a0568:/var/www/html# echo “php_value upload_max_filesize 256M” >> .htaccess
root@f125876a0568:/var/www/html# cat .htaccess
# snipped
php_value post_max_size 256M
php_value upload_max_filesize 256M

Using >> in the echo command will append the line to the existing content present.

Found this useful? Everything here is free and stays that way. If it saved you an afternoon, you can buy me a coffee.