admin管理员组

文章数量:1122846

I'm using docker and docker compose to install WordPress on my localhost and everything is working fine however i'm having problems when uploading new media and installing themes, new plugins e.t.c.

The message "Could not create directory" appears when i want to install a new plugin.

With extensive research i have tried many options to fix the file/folder permissions, even with a chmod 777 and still with no success.

My docker compose file is:

wordpress:
  container_name: testing
  image: wordpress
  environment:
    - WORDPRESS_DB_PASSWORD=password
    - VIRTUAL_HOST=stores.dev
  ports:
    - "80:80"
  volumes:
    - ./:/var/www/html
  links:
    - psdb4:mysql

psdb4:
  image: mysql:5.7
  environment:
    - MYSQL_ROOT_PASSWORD=password
    - MYSQL_DATABASE=wordpress

I have used the following command with no such luck on my WordPress directory:

chmod -R 777 wordpress
chmod -R 755 wordpress

I'm using a Mac on El Capitan 10.11.6.

It would also be nice to have my virtual host 'stores.dev' to work too but that fails and the WP site can only be accessed via my docker machine IP.

Kinda losing hope with all this and wanting to get it sorted.

Cheers

Matt

I'm using docker and docker compose to install WordPress on my localhost and everything is working fine however i'm having problems when uploading new media and installing themes, new plugins e.t.c.

The message "Could not create directory" appears when i want to install a new plugin.

With extensive research i have tried many options to fix the file/folder permissions, even with a chmod 777 and still with no success.

My docker compose file is:

wordpress:
  container_name: testing
  image: wordpress
  environment:
    - WORDPRESS_DB_PASSWORD=password
    - VIRTUAL_HOST=stores.dev
  ports:
    - "80:80"
  volumes:
    - ./:/var/www/html
  links:
    - psdb4:mysql

psdb4:
  image: mysql:5.7
  environment:
    - MYSQL_ROOT_PASSWORD=password
    - MYSQL_DATABASE=wordpress

I have used the following command with no such luck on my WordPress directory:

chmod -R 777 wordpress
chmod -R 755 wordpress

I'm using a Mac on El Capitan 10.11.6.

It would also be nice to have my virtual host 'stores.dev' to work too but that fails and the WP site can only be accessed via my docker machine IP.

Kinda losing hope with all this and wanting to get it sorted.

Cheers

Matt

Share Improve this question asked Oct 23, 2016 at 5:17 ShoeboxShoebox 3342 gold badges6 silver badges15 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

In the end I went with XAMPP and the WordPress Bitanami application.

I have yet come across any issues with file permissions and managed to setup virtual hosts with the help of this tutorial.

本文标签: localhostWordPress Permissions on my Local with Docker