which you introduced above is not taking care of the /usr/local/etc/php/conf.d folder.
Note that I am not nitpicking here - my intent is to finish this discussion in a way that will provide the good solution for anyone who decides to use Docker to install wordpress.
Try increasing the value to what you think you want the maximum to be for your Wordpress site.
Below is for 1024M. Iām pretty sure the value has to be in megabytes.
I believe that you misunderstood my todayās remark, so I will restate it this way: the file /usr/local/etc/php/conf.d/uploads.ini should also be persisted the same way as the folder /var/www/html
I think for the /usr/local/etc/php directory, the better wording is to have it exposed as a volume so you can do a bind mount and specify overrides. Nothing in that directory is modified at run time so no need for you to define it on an external volume and make it persistent.
Tell them you want the Docker Official Wordpress Docker Image to expose the /usr/local/etc/php directory as a volume mount point so you (and other users) can bind mount your own customization files at container run time.
Very good observation (Nothing in that directory is modified at run time), @gforghetti
I stand corrected and grateful for your time spent helping me to resolve my problem. The good side-effect is that this solution will help many other folks that undoubtedly follow.
I created this issue at the suggested GitHub repo and will update this thread once that issue gets resolved.
Yes, that looks good and no need for you to build a custom docker image. I had tried that previously and it did not work for me. I probably had a typo on the target side of the mount.
Find the PHP.ini file in root directory.If you not see the file select the option āShow hidden filesā then the PHP.ini file will be visible. After that add this code in PHP.ini
Hi gary use this docker-compose.yml file and in same folder create two folder with name ādatabaseā and āhtmlā and one file name āuploads.iniā
fire up the compose file
Iām really newby at Docker, so I donāt know if the way of modifing the file is an good idea.
However for testing purposes Iāve entered the container with bash and created the php.ini-File with nano to increase the upload-size (Using Bash infos: https://ligerlearn.com/how-to-edit-files-within-docker-containers/)
Get Container ID docker ps
Open Bash: docker exec -it CONTAINERIDXY /bin/bash
For just testing and trying something out, itās okay. In other case, you should not do that. Bind mount a configuration file or build your own image containing that file.
Hi
I ran into the same problem
The uploaded file exceeds the upload_max_filesize directive in php.ini.
How do I access the php.ini file in order to change it?
If possible a detailed explanation
Thanks