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:

  container_name: testing
  image: wordpress
    - VIRTUAL_HOST=stores.dev
    - "80:80"
    - ./:/var/www/html
    - psdb4:mysql

  image: mysql:5.7
    - 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.



1 Answer 1


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.

  • 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
    Commented 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.