If you have trouble uploading Wordpress image files with KUSANAGI Runs on Docker

File upload fails

I was having trouble uploading images to Wordpress, but I succeeded by changing the folder permissions.

The cause is the permission of the folder

Wordpress image files will be uploaded to / home/kusanagi/project/DocumentRoot/wp-content/uploads. Change the permissions here.

First, log in to Docker's ftp container

$  docker-compose exec ftp sh

The following is the work inside the ftp container.

/ # cd /home/kusanagi/project/DocumentRoot/wp-content
/home/kusanagi/project/DocumentRoot/wp-content # find uploads -type d -exec chmod 775 {} +
/home/kusanagi/project/DocumentRoot/wp-content # ls -al
total 40
drwxr-xr-x    9 kusanagi 1001          4096 Oct 11 03:42 .
drwxr-xr-x    5 kusanagi 1001          4096 Dec 20 14:41 ..
-rw-rw-rw-    1 kusanagi 1001            28 Aug  5 05:53 index.php
drwxr-xr-x    4 kusanagi 1001          4096 Dec 20 14:41 languages
drwxr-xr-x    3 kusanagi 1001          4096 Jul 16 10:24 mu-plugins
drwxr-xr-x    5 kusanagi 1001          4096 Dec 20 14:37 plugins
drwxr-xr-x    8 kusanagi 1001          4096 Dec 20 14:41 themes
drwxr-xr-x    2 1001     1001          4096 Dec 20 14:41 translate-accelerator
drwxr-xr-x    2 kusanagi 1001          4096 Dec 20 14:41 upgrade
drwxrwxr-x   11 kusanagi 1001          4096 Aug  7 10:16 uploads

This should work.

Recommended Posts

If you have trouble uploading Wordpress image files with KUSANAGI Runs on Docker
If you are having trouble updating your Wordpress plugin with KUSANAGI Runs on Docker
Update container image with KUSANAGI Runs on Docker
If you get stuck with PHPStorm and xdebug on docker. trouble shooting
WordPress with Docker Compose on CentOS 8
Allow image posting with [Docker + WordPress + MySQL]
If you have trouble with the character code problem in Myanmar (Burmese)
Conveniently insert / update records with MySQL INSERT ... ON DUPLICATE KEY UPDATE
Update container image with KUSANAGI Runs on Docker
If you have trouble with JPA or Hibernate, don't google and look here first
Until you try running Apache Kafka with docker image
Until you run Quarkus and run docker image on Amazon ECS
I tried running WordPress with docker preview on M1 Mac.