Docker Setup for Local WordPress Development

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ค. 2024
  • Are you sick of working with complicated WordPress setups using tools like XAMPP? Or maybe you've got a not-quite-working Docker configuration and need just a nudge in the right direction?
    In this video, I'm going to show you an way to set up a local WordPress development environment using Docker. We'll create a local NGINX image, along with a MySQL database, and bring everything together for WordPress.
    It should make it easier to keep your own plugins and/or themes in version control, while ignoring the other bits of WordPress that you don't really care about.
    👉👉Grab the Code on Github!
    github.com/wazooinc/local-wor...
    🔗Grab My Other Products Available:
    - Build Your First Web Service API using Spring Boot 3: wazoowebbytes.gumroad.com/l/x...
    👋🏻Connect with me:
    Twitter: / eyuzwa
    🔗References:
    - Docker Desktop Client - www.docker.com/
    - WordPress Download - wordpress.org/download/
    📖I'm also going through the Bible over at @BibleTimeWithWazoo
    ===---=== Chapters ===---===
    00:00 - Introduction
    01:05 - Creating a .env
    02:15 - Define Nginx in docker-compose.yml
    04:30 - An nginx default.conf starter
    07:48 - Define MySQL database in docker-compose.yml
    11:00 - Define phpMyAdmin in docker-compose.yml
    14:08 - Define WordPress in docker-compose.yml
    18:20 - Update nginx default.conf for fastcgi
    24:00 - Define local volume mirror for WordPress content
    #wordpress #docker #nginx
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 25

  • @wazoowebbytes
    @wazoowebbytes  2 หลายเดือนก่อน +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 19 วันที่ผ่านมา

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

  • @alineoliveira2554
    @alineoliveira2554 หลายเดือนก่อน

    Great tutorial, thank you very much for this job

    • @wazoowebbytes
      @wazoowebbytes  หลายเดือนก่อน +1

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

  • @visualmodo
    @visualmodo 2 หลายเดือนก่อน

    Truly good job!!!

    • @wazoowebbytes
      @wazoowebbytes  2 หลายเดือนก่อน

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

  • @enjoin418
    @enjoin418 2 หลายเดือนก่อน +3

    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  2 หลายเดือนก่อน +2

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

  • @SergioDeFalco
    @SergioDeFalco 14 วันที่ผ่านมา

    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?

  • @freetime202
    @freetime202 2 หลายเดือนก่อน

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

    • @wazoowebbytes
      @wazoowebbytes  2 หลายเดือนก่อน

      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!

  • @michaelmurat5481
    @michaelmurat5481 2 หลายเดือนก่อน

    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  2 หลายเดือนก่อน +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 2 หลายเดือนก่อน

      @@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 2 หลายเดือนก่อน

      everything worked, thanks for the content

    • @wazoowebbytes
      @wazoowebbytes  2 หลายเดือนก่อน

      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)

  • @matthewlee-mu2kq
    @matthewlee-mu2kq 24 วันที่ผ่านมา +1

    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  23 วันที่ผ่านมา

      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!

  • @TrodethOulsarakham
    @TrodethOulsarakham หลายเดือนก่อน

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

    • @wazoowebbytes
      @wazoowebbytes  หลายเดือนก่อน

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