1

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

1 Answer 1

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.

1
  • The easiest solution I have found is Local by Flywheel. Their hosting is mediocre at best but their local dev app is pretty sweet. local.getflywheel.com
    – mrben522
    Dec 19, 2018 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.