Nyxynyx
Nyxynyx

Reputation: 63619

Wordpress Docker Container Cannot Upload Theme

Using the wordpress:latest to start a docker container, after uploading a 25MB .zip theme file, Wordpress shows the error

Are you sure you want to do this?

Please try again.

The docker container was started using

docker run -d \
--link mysql:mysql \
-p 8080:80 \
-e PHP_UPLOAD_MAX_FILESIZE=100M \
-e PHP_POST_MAX_SIZE=100M \
-e max_execution_time=120 \
-e max_input_time=120 \
-e memory_limit=64M \
-v /root/my-wordpress:/var/www/html/wp-content \
--name my-wordpress \
wordpress:latest

There's no problem uploading images to the Wordpress site.

Any idea what may have gone wrong?

Upvotes: 2

Views: 2803

Answers (1)

eduardogoncalves
eduardogoncalves

Reputation: 173

You can setup the Official Wordpress with Mariadb docker's container. I sugest using kitematic (alpha) v0.17.1 because it has linking support.

But the important part is to enable volume, to have data persistence, so you can edit .htaccess and add at the end of the file:

php_value upload_max_filesize 100M
php_value post_max_size 100M

printscreen of this config

Upvotes: 1

Related Questions