Set up WordPress with Docker… Fast!

Views:30386|Rating:4.86|View Time:8:12Minutes|Likes:383|Dislikes:11
Get to know everything about Docker and become a Docker Master! [Online Course]:

There are many sources online explaining how to set up a WordPress blog with Docker. Unfortunately many force you into bad practices. In this video we’ll show the perfect workflow to set up, develop and update a WordPress installation in a matter of minutes. No hassle!

Subscribe to our container newsletter:
Read more on our blog:

Github repo with demo code:
Our blog:

You may also like...

34 Responses

  1. Mat Gargano says:

    Being absolutely new to docker, after resisting it for so long…

    1. When updating the docker volume to 3.7.1 why did you have to click the update button within the admin ? Shouldn't that image contain the updated software?
    2. How would you deploy this to a live or staging server?
    3. How do you bind to local domains e.g. run this on locally – so that I can run multiple WordPress applications locally using a localized fqdn.

  2. Radovan Surlak says:

    Thank you for the video 🙂

  3. George Smith says:

    i am no expert but I read it's not good practice to share binary files like databases

  4. Darren Parenzee says:

    Thank you! This was really helpful

  5. Dnishchenko Denys says:

    I have an issue with permissions. I have added a volume to wordpress service '- ./wp-content:/var/www/html/wp-content' but from local environment I can't create files and folders and also change files

  6. Animated Freak says:

    This would be perfect for the office I support. One of our goal is that our people should know WordPress but installing it locally on every machine takes time just for them to test and learn. We want to have a local server that people can connect locally to and use WordPress for testing plugins and learning. This looks like it would be perfect for that. Are there any tutorial to set something like that up? To have multiple once running on a single server machine.

  7. Cheng32290 says:

    I created a docker-compose file following the demo code, but when I'm trying to install a WP plugin, it's showing me an error like this: "Installation failed: Could not create directory."
    I guess is something related by user permission, but I have no idea about how to fix it. (BTW, I'm using OSX)
    Do you have any idea about it?

    Thanks for your videos.

  8. Cheng32290 says:

    Thank you so much! your video is really helping me. I just have a question about WP updates.
    The manual update that you did after the image changes to 3.7.1 is only to update the version in the DB? or that's really downloading and updating the WP core codes?

  9. s0mojo says:

    Awesome vid mate thank you!

  10. Mohsin Rahman says:

    How can we setup Vanilla Javascript App with Docker?

  11. Paul Simpson says:

    Really helpful, thank you!

    I got this working, but now when I try to upload a plugin, I'm hitting a file size limit. I get the error "The uploaded file exceeds the upload_max_filesize directive in php.ini".

    Can you walk me through modifying this file? The container doesn't have vi, nor can I find php.ini! 🙁

    Thanks 🙂

  12. Samantha Wanninger says:

    nice tutorial! one question are left.. how can i log with my sequal pro to this db container? it doesn't work for me with localhost or port 3306 with login root + pw

  13. Kamal Yadav says:

    please, tell how to perform this setup using ansible playbook?

  14. duART Studio says:

    Thank you for this video! very useful!

  15. Circuit Breaker says:

    with docker-compose up -d wordpress, my guess, is that you just updated the wordpress setup/installation, not the actual deployed software, isn't it? correct, if I'm wrong

  16. hussein leong says:

    Very helpful. Thanks.

  17. Steve J says:

    Im having an autoptomize not enabled error when I launch wordpress.. Anybody ever experience this? I can SSH into my ec2 instance where my docker container is running and type docker exec -it <ImageID> chown -R www-data:www-data wp-content/, and this fixes it but im trying to do that directly from my docker file and not having any luck. Any Suggestions?

  18. Sorcerer Stone says:

    Newbie question. Using DockerToolbox for Win8.1 & Docker for Windows for Win10. But I use Win8.1 PC mostly.
    In this video,
    Did you create a local folder, e.g. c:/SomeFolder, and placed the yml file in that folder before you ran the command docker-compose up -d ?

    WRT Volume, does the subfolder, /var/lib/mysql, automatically created in this "c:/SomeFolder" directory automatically?

    I am in Windows environment, do I need to modified the yml file in order to ensure the "/var/lib/mysql" subfolder is created in the "c:/SomeFolder" directory?

    Will phpmyadmin also created in this "c:/SomeFolder" folder? i.e. I can still use phpmyadmin on my other mysql (non-docker) install in my PC?

    When I bring up docker, there is a localIP assigned: It is always the same IP whenever docker is up.
    In your video, when you tested WordPress, you used localhost.
    In my case, I can't use localhost to run WordPress but, correct?

    How did you configure your computer to run WordPress in localhost?

    Thanks in advance.

  19. basha shaik says:

    I am new to dockers.

    After searching lot of time in the time in Internet. I found your video.
    Thank you very much. Your video helped a lot.

  20. ACES GROUP says:

    so where is the benefit … fo dockerC. against debian/ubuntu/nginx server speed ? from customer perspektiv…i have running multi site on diff. server constellation.whats better ?? database access ? or general speed why ? if u wish u can send me email [email protected]…com …need to understand docker systems

  21. Julianoe de Geek's Curiosity says:

    Great video. And how would you recommend to do to have multiple instances on the same server pointing to differnet domains? (multiple wordpress website)

  22. Sebastian Spatafore says:

    this is so easy beside do everything from scratch with Ansible.

  23. oharawinter says:

    Great video, but not super clear on the last couple lines `volumes: db_data` where is the data actually stored?

    Also, what would the setup look like for mail?

  24. Sharon S says:

    can i use this code on raspberry pi?

  25. Nikas Klimčiauskas says:

    thanks, well done, sublime has themes you know

  26. Sean Lloyd says:

    Just what I needed. A very quick, simple video to get myself up and running. Thanks!

  27. Mighty Miguel says:

    So i have WordPress running but I can't find that file you have it's strange but I did also download Docker tools if that makes any diff Thanks in advance

  28. RealEstate3D says:

    A nice video, but it stops like most of web tutorials at the point where it becomes interesting: What about mail?? This video configuration is nice for learning Docker. And the video is very useful for this purpose. No question about that. But a fully fledged wordpress installation must of cource include the mail configuration. No thumb up, no thumb down.

  29. Joan Josep Escandell Riera says:

    Very helpful!!


  30. jose fano says:

    Hi, great video! How would you deploy to a production server ?

  31. Miguel Queiroz says:

    the volume db_data where do you define that?

  32. Nishant Kumar says:

    how can i connect my WordPress container to a external database?

  33. Alexandra Glam says:

    I cannot get myPHPAdmin to sign in because it says "#1045 – Access denied for user 'root'@'' (using password: YES)"

    Here's my docker-compose:

    version: '2'
    – db
    image: wordpress:4.7.5-php5.6
    restart: always
    – ./wp-content:/var/www/html/wp-content
    WORDPRESS_DB_HOST: db:3306
    – 80:80
    – 443:443
    – back
    image: mariadb:10.3.0
    restart: always
    – db_data:/var/lib/mysql
    – back
    – db
    image: phpmyadmin/phpmyadmin
    restart: always
    – 8080:80
    PMA_HOST: db
    – back

    Any help will be greatly appreciated!

  34. Sebastian Castellanos says:

    Hi again 🙂
    I trying to up the docker in the port 80, so when I enter my domain I get direct to wordpress site, but the if I put localhost it get always redirected to localhost:9000, I do not have any configuration for that, in the yml config for wordpress I putt 80:80.

    Any help is
    well welcomed 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *