[ Kinh nghiệm wordpress ]

Build a solid WordPress dev environment with Docker

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:

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:

Nguồn: https://grenadesandwich.com/

Xem thêm: https://grenadesandwich.com/kinh-nghiem-wordpress/

Tags: ,,,,,,,,,,,,,,,,,

Andrew Schmelyun

38 Bình luận

  1. 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

  2. You are the best tutor. Thanks from Indonesia.

  3. After leaving previous job and not using my previous docker setup for months, I needed a refresher to get everything going on my personal laptop. Especially compared to all the various docs, SO threads, videos, and Reddit posts I went through when I created my prev job's new docker setup, this is the best Docker intro I've seen, nevermind best WP + Docker intro. You saved my bacon, dude. Will be checking out your other vids. Thanks for making this!

  4. Great video!
    But I have one problem =D
    When I add a volume for nginx, so it is using a config from ./nginx/default.conf – I am getting 502 Bad Gateway :/
    Did someone have the same issue?

  5. This video is so well designed! Thank you so much for the time and effort you have put into this informative video!

  6. Thanks Andrew!!!

  7. This is… so spot on and awesome. I love your delivery and explaining everything as you go along. Well done.

  8. If anyone is having a 403 error, in the beginning he skipped this line in the nginx configuration file:
    index index.php;
    But later on he added it.

  9. Took me some back and forth but I eventually got it working after watching your video. Thanks for the great tutorial!!!

  10. 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.

  11. Great tutorial, thanks.
    If one would like to use this with apache server, how would default.conf file Look like for apache?
    Thank you

  12. All good until 9:50 … Then all I get is a "403 Forbidden" response from server. Any one else encountered this?

  13. how can i clone my current wordpress live site to this new docker wordpress

  14. 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!

  15. 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?

  16. 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.

  17. Great, thanks a lot. The only think I'm not getting right is the certs. Chrome says it's not good. Cheers.

  18. awesome tutorial, thanks

  19. how to run it into digital ocean now.

  20. 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

  21. Hi Thank you for the video, very helpful. What is entrypoint: ['wp', '–allow-root'] for?

  22. 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.

  23. 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.

  24. 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?

  25. An excellent and informative lesson, Thank you so much.

  26. thanks, Andrew! I learn a lot!

  27. 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!

  28. Excelent! Thank you. Unfortunately, I get a 403 Forbidden after setting up the default.conf file. Has anyone gotten the same error?

  29. Excellent video. Could not be better explained. Thanks for sharing this.

  30. Nice explanation, really appreciate what you have done but there are issues with the new M1 chip.
    Thank again

  31. Docker + Bedrock + Sage = Paradise

  32. great tutorial

  33. Great tutorial!
    Unfortunately my WordPress installation is slow, takes -+7 seconds to load a single page. I'm running Windows 10 and Docker on a SSD, so it should not be so slow. Is there any way I can improve speed?

  34. Nice video, please how do you set domain kind .test?… can you share how do you do that please?.. Thank you.

  35. what a quality step by step explanation!

  36. amazing guide! every step is well explained and doesn't left any confusion, thank you!

  37. Hi Andrew, thanks for the tutorial. i was trying it out but can't seem to get the wp container to start. The log says
    less: unrecognized option: r

    I can still install wordpress and access the dashboard on localhost but the container is grayed out. Please advise. Thanks again for the great tutorials!

Trả lời

Email của bạn sẽ không được hiển thị công khai.