Today I learned: Nginx, WordPress and Docker

So I decided to follow this guide to spawn a wordpress site. This is an awesome guide that uses Nginx, WordPress and Docker in a wonderful orchestration via Docker Compose. I started to have a weird issue with my themes. So images were not loaded, lack of various styling resources. I couldn’t understand where the issue came from. Then I realized that I mounted the themes folder in the docker-compose.yaml file in the following manner:

./themes:/var/www/html/wp-content/themes

The problem is that I shared the folder from the volume with the WordPress container yet not with the Nginx container! So don’t forget to share the folder with both containers so the webserver can serve the actual data! Good luck!!!

Leave a comment