Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cmoa-webmaster/f07de5e3ab6981cbc334a9d9b56f1831 to your computer and use it in GitHub Desktop.
Save cmoa-webmaster/f07de5e3ab6981cbc334a9d9b56f1831 to your computer and use it in GitHub Desktop.
Working locally on a WordPress site you may find you are unable to update WordPress plugins.

Localhost WordPress Plugin Permissions

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.

  1. Run docker ps to figure out the container name. It should be something like ”themename_wordpress_1”.
  2. Run docker exec -it [container_name] /bin/bash/. That should put you in /var/www/html within the docker container.
  3. Run chown www-data:www-data wp-content/. You should see some evidence that permissions have been updated.
  4. Run exit to close the docker container.
  5. You now should be able to update plugins.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment