Wordpress Docker won't increase upload limit Wordpress Docker won't increase upload limit wordpress wordpress

Wordpress Docker won't increase upload limit


it worked for me as follows:i created uploads.ini alongside of docker-compose.yml with following lines. this is exactly how it stated in fist post.

file_uploads = Onmemory_limit = 500Mupload_max_filesize = 500Mpost_max_size = 500Mmax_execution_time = 600

after this i added

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

to my .yml file as it states in first post.

after this i had to delete the container/images (basically start from scratch):

docker stop [image name]docker rm [image name]docker image rm [image name]

some places i end up using ID insted of image name. name or ID basically you have to stop, remove container and image. bottom line is start from scratch with additional line in your .yml file as describe in first post. remember, you'll lose all your wp work.now run

docker-compose up -d --build

upload limit should be increased now. i was able to upload my new bigger theme after this change. no more upload file size error. only question is if you need to increase this upload size limit in the middle of your work then how would you do this?...


I discovered my problem.

docker-compose kill will kill a container but rebuild it from a cache. Meaning no changes to my files were taking place.

Use docker-compose up -d --build


I prefer to adjust .htaccess for my own workflow.Last 2 lines are what I added

<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]</IfModule># END WordPressphp_value upload_max_filesize 500Mphp_value post_max_size 500M

then restart

docker-compose down --volumesdocker-compose up -d

Enjoy )