Build a solid WordPress dev environment with Docker
#wordpress erste schritte –>
In this 25 minute video, I’ll show you how to create and use a basic WordPress development environment built with Docker and Docker Compose.
Follow me on Twitter for more web development tips, news, and tutorials: https://twitter.com/aschmelyun
You’ll learn how to:
– Install and setup Docker
– Create a Docker Compose file to scaffold out containers
– Enable HTTPS and keep MySQL data persistent
– Use the wp-cli tool without having to install it locally
– 0:00 Intro and Setup
– 2:50 Scaffolding Containers
– 6:10 Configuring Nginx
– 10:10 Installing WordPress
– 15:06 Adding HTTPS
– 19:00 Persistent MySQL Data
– 20:58 Adding wp-cli
– 24:42 Conclusion
Docker documentation about delegated volumes for MacOS: http://docs.docker.oeynet.com/docker-for-mac/osxfs-caching/
Recommended Posts

In 5 Schritten WordPress auf PHP8 umstellen – Optional: Weiße Startseite WordPress beheben
March 9, 2023

Jimdo Website erstellen – Schritt-für-Schritt Tutorial (2023)
February 27, 2023
Comments
Comments are closed.
If you'd like to see the full code along with some additional helper items, check out the GitHub repo here: https://github.com/aschmelyun/docker-compose-wordpress
Nice explanation, really appreciate what you have done but there are issues with the new M1 chip.
Thank again
Excellent video. Could not be better explained. Thanks for sharing this.
Excelent! Thank you. Unfortunately, I get a 403 Forbidden after setting up the default.conf file. Has anyone gotten the same error?
Thank you very much Andrew! You can't imagine how much you've helped me understand how docker and docker -compose work. The configurations inside the containers is something I did not find anywhere else … thank you so much for your generosity!
thanks!
thanks, Andrew! I learn a lot!
An excellent and informative lesson, Thank you so much.
thanks for the great tutorial. I am following along, checked 100 times, and maybe there has been some changes with docker.Â
01. When I try to perform the setup I get the error "Error establishing a database connection". I used everything as you have it.
Is there a solution that you may recommend, please?
02. It seems that it redirected automatically from "localhost" to "wordpress-docker.test", it doesn't do this automatically for me. Was there something that you did in between?
Just awesome buddy! Keep going. I have watched lots of videos on Docker but your way of explanation is super easy. Thanks a lot to make things easier.
Hey Andrew, thank you for the great video, im learning a lot. However i did run into a problem. When i try to copy the nginx/default.conf into the container the container shows as Exited (1) when running docker ps. Do you happen to know why ? thank you.
Hi Thank you for the video, very helpful. What is entrypoint: ['wp', '–allow-root'] for?
Hello Andrew, I have just started getting into Docker and I was following along on this video when I ran into a snag. I got up to about the 9:50 mark, when I started the container that went fine, but when I tried refreshing the browser to start WordPress I am getting a 403 Forbidden error. I carefully looked over the code, and I am not seeing anything amiss. Hoping for some advice. Thank you
how to run it into digital ocean now.
awesome tutorial, thanks
Great, thanks a lot. The only think I'm not getting right is the certs. Chrome says it's not good. Cheers.
This might be the best dev. tutuorial on the internet – the simplicity of the start that leads the viewer to an explanation of very complex solution while solving problems as they arrive is so gratifying to watch, combined with clear spoken Engish and being on point.
Great video! I hope i can see more like this;) … But i have a problem, when i will change my port e.g. localhost:8090, i can't understand, where i make the config change, when i made only the change at the docker-compose ports-8090:80, i recieved an error on the browser (EMPTY_RESPONSE)… Can anyone help me?
Hi Andrew, thank you for the great video!
Unfortunately there is a problem, after I added an /nginx folder to store default.conf and make docker-compose up -d again, what I see is not WP's installation page but '403 Forbidden' page by nginx, could you tell me what happen? I use WSL on Windows 11. Thanks!
how can i clone my current wordpress live site to this new docker wordpress
All good until 9:50 … Then all I get is a "403 Forbidden" response from server. Any one else encountered this?
Great tutorial, thanks.
If one would like to use this with apache server, how would default.conf file Look like for apache?
Thank you
I am having problems with permissions. It would appear as if the container uses a user called "82 [82]". It is breaking a lot of things in WordPress like media and plugins, along with updates. If anyone has the time to help please give it. I don't know how to share permissions with a user that is in a docker container.