Working locally on a WordPress site you may find you are unable to update WordPress plugins. WordPress will ask for web server credentials. This is do to permissions issues between Docker and your local OS. To get around this issue, execute the following commands from the directory where your docker-compose.yml file lives.
- Run
docker ps
to figure out the container name. It should be something like ”themename_wordpress_1”. - Run
docker exec -it [container_name] /bin/bash/
. That should put you in /var/www/html within the docker container. - Run
chown www-data:www-data wp-content/
. You should see some evidence that permissions have been updated. - Run
exit
to close the docker container. - You now should be able to update plugins.