docker-library / wordpress

Docker Official Image packaging for WordPress
https://wordpress.org/
GNU General Public License v2.0
1.79k stars 1.07k forks source link

Unable to create directory wp-content/uploads/2024/07. Is its parent directory writable by the server? #906

Closed bkmorale closed 4 months ago

bkmorale commented 4 months ago

Hi All,

I'm trying to use the officially supported wordpress image in my container setup however out of the box it doesn't allow the upload of media to the upload directory. I haven't done anything special with the container and just started it up using a docker volume here is my docker-compose file

version: '3.1'

services:

  wordpress:
    image: wordpress
    restart: always
    ports:
      - 8081:80
    container_name: wordpress
    environment:
      WORDPRESS_DB_HOST: *****
      WORDPRESS_DB_USER: ******
      WORDPRESS_DB_PASSWORD: ******
      WORDPRESS_DB_NAME: *******
    depends_on:
      - *******
    volumes:
      - wordpress:/var/www/html

  db:
    image: mysql:8.0
    restart: always
    container_name: DB
    environment:
      MYSQL_DATABASE: ******
      MYSQL_USER: *****
      MYSQL_PASSWORD: *****
      MYSQL_RANDOM_ROOT_PASSWORD: '1'
    volumes:
      - db:/var/lib/mysql

volumes:
  wordpress:
  db:

Is there something else I need to do to get this working?