(919) 964-9842
(919) 964-9842

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 *