Docker PHPMyAdmin Upload Max File Size

I found several articles regarding upping the upload_max_filesize and post_max_size for PHP for PHPMyAdmin, but I don't believe they consider the phpmyadmin Docker image. Since this is separate from the WordPress image that I use, it doesn't utilize the same php.ini file that we're using to adjust these numbers.

It's a pretty straightforward fix and should utilize the same file you're currently using for your php.ini override. In this instance, we're using uploads.ini as our override file.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
version: '3'

services
:
db
:
image
: mysql:5.7
volumes
:
- db_data:/var/lib/mysql
restart
: always
environment
:
MYSQL_ROOT_PASSWORD
: wordpress
MYSQL_DATABASE
: wordpress
MYSQL_USER
: wordpress
MYSQL_PASSWORD
: wordpress

wordpress
:
depends_on
:
- db
image
: wordpress:5.2.2-php7.3-apache
ports
:
- "8888:80"
restart
: always
environment
:
WORDPRESS_DB_HOST
: db:3306
WORDPRESS_DB_USER
: wordpress
WORDPRESS_DB_PASSWORD
: wordpress
WORDPRESS_DEBUG
: "true"
working_dir
: /var/www/html
volumes
:
- ./wp-content:/var/www/html/wp-content
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini

phpmyadmin
:
depends_on
:
- db
image
: phpmyadmin/phpmyadmin
restart
: always
ports
:
- "3333:80"
environment
:
PMA_HOST
: db
MYSQL_ROOT_PASSWORD
: wordpress
volumes
:
- ./uploads.ini:/usr/local/etc/php/conf.d/php-phpmyadmin.ini
volumes
:
db_data:

The difference from other docker-compose files is that I'm specifying the phpmyadmin image to also utilize the uploads.ini file that's overriding our php.ini values. Adding this line will apply your values that you're using

 

Categories: Development

Leave a Reply

Your email address will not be published. Required fields are marked *

About Christina M. Gleason

Christina GleasonDeveloper who has been playing with websites since I was a preteen, it started with some tables and CSS creating a website about fairies (true story). Since then, I got a BS in Computer Science, and went to work on PHP-based websites and applications. I spent some time in custom frameworks, then a lot of time in custom WordPress development and Magento e-commerce. Industries I've worked in include logistics, healthcare, retirement communities, legal, spiritual, and HVAC.

I am an active knitter, and I also really enjoy scrapbooking and painting. Creativity has always been at my core, and I bring that into my daily workflow all the time. Lifting and working out is also important to me. I'm also married, have two daughters, and two rescue dogs Barlow and Sunshine.

Find me on: Ravelry | Instagram | Twitter | LinkedIn | GitHub