Docker Setup for Local WordPress Development

Поділитися
Вставка
  • Опубліковано 17 лис 2024

КОМЕНТАРІ • 67

  • @Greg4510able
    @Greg4510able 17 днів тому

    Thank you so much for this. I looked at a guide earlier which was basically the compose.yaml file with no explanation. As a new Docker user, this was EXTREMELY helpful. Much appreciated! God bless you sir

    • @wazoowebbytes
      @wazoowebbytes  14 днів тому

      Praise the Lord! I give Him all the credit for sure - thank you so much for stopping by and so happy to hear it helped you out

  • @brendancurtin6378
    @brendancurtin6378 Місяць тому +1

    Very nice video and also the SSL followup. I tried in both WIndows 11 and Ubuntu with no problems - provided I remembered to use the right version of the Wordpress image! One thing missing is the Docker images are not set up for sending emails. If you looking for a new topic that would be great - ie to add the ability to send emails to the dev environment - to test contact forms etc.

    • @wazoowebbytes
      @wazoowebbytes  Місяць тому

      oh wow! Thank you so much - that is an excellent suggestion!

  • @RoryWebb-i6j
    @RoryWebb-i6j 9 днів тому +1

    This was awesome. Thank you so much! Do you have any further videos on this about theme development or perhaps how to deploy this to a live server?

    • @wazoowebbytes
      @wazoowebbytes  8 днів тому

      Thanks so much - yeah I think it's time to follow up on this with some more topics such at deployment, etc. Much appreciate the suggestions!

  • @agnemedia624
    @agnemedia624 Місяць тому +1

    Great explaining and focus on 'name' configire and setup with Nginx. Thank you
    How different Apache default.conf and set up for sending emails nice to see

  • @enjoin418
    @enjoin418 6 місяців тому +4

    Hello there! Nice video, can you please go this tutorial one step further to use custom domain like wordpress.test and SSL certificate?

    • @wazoowebbytes
      @wazoowebbytes  6 місяців тому +2

      Yes, sure! That's an excellent suggestion - appreciate that!

  • @matthewlee-mu2kq
    @matthewlee-mu2kq 5 місяців тому +2

    Great tutorial, I learnt so much about docker composer setup.👍
    Just one thing at 25:50, the mount is from the local machine to the containers. So you need to copy the content from the container to your local machine first before adding the "./src:/var/www/html/wp-content:rw".

    • @wazoowebbytes
      @wazoowebbytes  5 місяців тому

      hmm I'll experiment with that - thanks! I had to do something similar to a followup video I made on SSL, but I appreciate the feedback! Thanks a lot!

    • @rlrfproductions
      @rlrfproductions 28 днів тому

      @wazoowebbytes At the step of 25:40 I have the src folder but it's completely empty, and wordpress now complains there's no themes installed.
      I assume it's related to this comment?

  • @wazoowebbytes
    @wazoowebbytes  6 місяців тому +6

    Hope everyone finds some value in this one. I'm using it to try and follow up on comments left on a previous WordPress video of mine.

    • @JeremyMapalad
      @JeremyMapalad 4 місяці тому

      May I ask what's the difference between this and the previous video you made?

    • @MichaelMollard
      @MichaelMollard 3 місяці тому

      Great video, thanks. I'm new to Docker, but quick q. If I want to load 2 WP sites, should I have one nginx instance, and separate WP configs, with common dependencies (ngix, mysql, phpmyadmin). Probably incorrect terminology, but hope that makes sense? 🤔

    • @wazoowebbytes
      @wazoowebbytes  2 місяці тому +1

      @@MichaelMollard yikes! apologies, just saw this now. You *could* do it that way since you're likely trying to isolate each WP install with its own database. I should actually play with that idea and see if I could get something to work. And yes, your terminology is totally correct! So sorry again for the super late reply!

    • @wazoowebbytes
      @wazoowebbytes  2 місяці тому

      @@JeremyMapalad the run time? Okay sorry - couldn't resist. Super apologies for the late reply, I sometimes struggle making sense of how YT sends comment notifications. The first video was a first attempt at just getting a basic Docker install up and running for WP. This one adds some extra bits so that you can do theme and plugin development within the same Docker container. Hope that helps!

    • @MichaelMollard
      @MichaelMollard 2 місяці тому

      @@wazoowebbytes thanks for the reply, appreciated 😉👍

  • @zarakikenpachi1799
    @zarakikenpachi1799 Місяць тому +1

    great work bro!

  • @tsukinousagi3174
    @tsukinousagi3174 13 днів тому

    How is it possible to mirror - ./src:/var/www/html:rw instead of - ./src:/var/www/html/wp-content:rw? I tried, but it doesn't work anymore. I'd like to have all html folder content in local to create modifications here. Could you please explain?

  • @LuckyBravo
    @LuckyBravo 2 місяці тому +1

    My WordPress installer is broken and without CSS. Checking the logs shows 301 error.
    The same thing for top admin bar. Luckily the dashboard works fine.
    Any idea why CSS files aren't loading? Am I missing something?
    (I'm using AWS EC2 instance with IP address no domain)

    • @wazoowebbytes
      @wazoowebbytes  Місяць тому

      hmm not offhand - could be a few reasons. I don't have an EC2 instance, but I'll try again locally to see if anything could account for that

  • @dduckluvsjava
    @dduckluvsjava Місяць тому +1

    New to this. I downloaded your files and everything works but SSL - Getting " cannot load certificate"

    • @wazoowebbytes
      @wazoowebbytes  Місяць тому

      hmm thanks - I'll see if I can reproduce that locally

  • @marenhelgemo5823
    @marenhelgemo5823 3 дні тому

    Thank you for a brilliant video. I just have one problem. I get this error-message: services.phpmyadmin.environment.networks must be a string, number, boolean or null. And I see in your code that "internal" is just written as it is. So... what can be the issue?

    • @marenhelgemo5823
      @marenhelgemo5823 3 дні тому

      Ok. So I coped your code from github, and now this errormessage: services.database Additional property env-file is not allowed

  • @שילוגסי
    @שילוגסי 3 місяці тому +1

    I have 2 issues here - (1) when going to homepage the front page is not showing but downloading some file instead. (2) plugin pages assets are not getting served but i'm getting 404 when requesting them. so the admin pages are not loading the content well, we have missing css, js and images files. all the files exist but nginx does not serve them and return 404s.
    can you please assist?

    • @adrielch02
      @adrielch02 3 місяці тому

      Me pasa lo mismo, no logro resolverlo todavia

  • @alineoliveira2554
    @alineoliveira2554 5 місяців тому

    Great tutorial, thank you very much for this job

    • @wazoowebbytes
      @wazoowebbytes  5 місяців тому +1

      Thank you so much for leaving a comment and stopping by!

  • @SergioDeFalco
    @SergioDeFalco 4 місяці тому

    Hi! thanks for your tutorial, just tested this but ./src is created by the linux user, when WordPress on Docker is owned by www-data:www-data, how did you solved this?

  • @MrHuerquen
    @MrHuerquen 18 днів тому +1

    is it opossible to convert it into a multisite implementation using subdomains?

    • @wazoowebbytes
      @wazoowebbytes  17 днів тому

      yeah - been looking at that myself as a good video to go through next. Thanks so much for bringing it up!

  • @avexar7901
    @avexar7901 4 місяці тому

    I tried to repeat after you. And there is a problem. When we add plugins or themes, their files are not added to Docker containers.

  • @PeterVatler-hv6nf
    @PeterVatler-hv6nf 3 місяці тому

    Very useful guide! When I try to run the containers, nginx can't start due "/bin/sh: 1: /start.sh: not found" How to solve this?

    • @wazoowebbytes
      @wazoowebbytes  3 місяці тому

      oh thanks! I'll take a look and try to reproduce it on my local

    • @joda313
      @joda313 2 місяці тому +1

      I had the same problem. Turns out it was because I had start.sh in Windows-style line endings, so I had to convert it to Unix-style endings.

    • @wazoowebbytes
      @wazoowebbytes  2 місяці тому

      @@joda313 ahhh interesting! Thanks for sharing that, and glad everything worked out.

    • @wazoowebbytes
      @wazoowebbytes  2 місяці тому

      @@joda313 d'oh - good find! Glad you spotted what was happening!

  • @visualmodo
    @visualmodo 6 місяців тому

    Truly good job!!!

    • @wazoowebbytes
      @wazoowebbytes  6 місяців тому

      booya! Thanks a lot, I truly appreciate it - thanks for stopping by!

  • @freetime202
    @freetime202 6 місяців тому

    This greatly good work. Can we move this environment to be live in azure devops environments

    • @wazoowebbytes
      @wazoowebbytes  6 місяців тому

      thank you so much. Yes, it should be possible to do that thanks to Docker. I don't have any Azure credits at the moment, but I'll keep that on my radar. Thanks for stopping by!

  • @hadirahmani7943
    @hadirahmani7943 27 днів тому

    hi. what's the HOSTNAME?

    • @wazoowebbytes
      @wazoowebbytes  27 днів тому

      it should be something like host.docker.internal:port

  • @michaelmurat5481
    @michaelmurat5481 6 місяців тому

    i cant log in to phpmyadmiin ((
    Failed to set session cookie. Maybe you are using HTTP instead of HTTPS to access phpMyAdmin.
    Perhaps that's why I can't install the WP -
    Error establishing a database connection

    • @wazoowebbytes
      @wazoowebbytes  6 місяців тому +2

      Oh no!! Yes, in this first approach - there's no SSL support (yet), so it is just using HTTP. I released a followup video where I go through setting up some SSL. Hope that helps and good luck!

    • @michaelmurat5481
      @michaelmurat5481 6 місяців тому

      @@wazoowebbytes Thanks for the answer, I watched the next video, but as usual, there were even more problems )) -- I can't log in with the accesses that I registered in the .env file :
      Cannot log in to the MySQL server
      mysqli::real_connect(): (HY000/1045): Access denied for user 'dbuser'@'172.19.0.2' (using password: YES)
      Didn't you have this problem during development?

    • @michaelmurat5481
      @michaelmurat5481 6 місяців тому

      everything worked, thanks for the content

    • @wazoowebbytes
      @wazoowebbytes  6 місяців тому

      oh nice! Glad you were able to get it working! What was the issue? (And no, I didn't have this specific problem during development)

  • @TrodethOulsarakham
    @TrodethOulsarakham 5 місяців тому

    Nignx alway restart. is it i store container in wsl2 dir?

    • @wazoowebbytes
      @wazoowebbytes  5 місяців тому

      not that I know of. It should all be contained within Docker. I don't know what might be causing it to restart since this setup isn't watching for file changes..

  • @poh9730
    @poh9730 3 місяці тому

    in 19:47 why did you cut the video, I was stuck there

    • @wazoowebbytes
      @wazoowebbytes  3 місяці тому

      oh! my apologies - I was just browsing to the site. What were you stuck on specifically?

  • @pedrogabriel4638
    @pedrogabriel4638 6 днів тому

    cannot load certificate "/etc/nginx/certs/host.docker.internal.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/nginx/certs/host.docker.internal.pem, r) error:10000080:BIO routines::no such file)

  • @benfitzgerald8140
    @benfitzgerald8140 3 місяці тому

    I might have jumped a step using your files from the git repo but the default.conf is broken for me with the restarting of nginx: "nginx: [emerg] host not found in upstream "wordpress:9000" in /etc/nginx/conf.d/default.conf:3" any ideas? (I'm trying to get into docker after years of VVV 😅).
    My bad, I fixed it - I was missing volumes (- wordpress:/var/www/html) & networks (- internal) params in the docker-compose yaml on the nginx service. This got things running so hopefully it helps the next person.

    • @wazoowebbytes
      @wazoowebbytes  3 місяці тому

      glad you found it - and thanks for sharing for others to find! Appreciate it a lot.