Build a solid WordPress dev environment with Docker

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ค. 2024
  • 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: / 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: docs.docker.oeynet.com/docker-...
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @aschmelyun
    @aschmelyun  9 หลายเดือนก่อน +16

    Hey new viewers! If you would like to see more content on WordPress and Docker, let me know what ideas you have in mind or what you'd like to learn more about.

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

      * How to use wp-env and configure on it composer autoload is the main problem.
      * How to make Vite compile with WordPress files and connect CI/CD dist for them.
      *Convert and connect fonts from otf and ttf to woff in WordPress project after compiling files on Vite.
      *Convert and connect img from jpg, png to webp in WordPress project after compiling files on Vite.
      *How to make a clear and clean structure for files in WordPress project for developing plugins and themes.
      *How to set up correctly and with best practices code style and lints for WP themes and plugin develop.

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

      @@karlson2804 great suggestion✌

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

      Thanks @aschmelyun its really helpful and really a good one and no doubt correct way to use docker with WordPress, waiting more videos on different topics please keep posting.
      Adding to this you can use wp-cli automation copying sh files to the root and execute installation and webpack internally setting apache/nginx logs can also be added to this.... thanks

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

      Wordpress theme development with Bedrock and Sage

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

      Was hoping to see phpmyadmin installed as well on this tutorial. It is Great tutorial, thank you!

  • @captainpumpkinhead1512
    @captainpumpkinhead1512 7 หลายเดือนก่อน +8

    I really appreciate how you let stuff break, and then went back and showed how to fix those things!! I thought that was really helpful! Thank you!!!

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

      Thanks for noticing! It's how I learn best, so I figured it's the better way to show it!

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

      oh yeah this is amazingly detail. I love it! Thank you

  • @MrZerosixZeroone
    @MrZerosixZeroone 2 ปีที่แล้ว +42

    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.

  • @tictac1020
    @tictac1020 2 ปีที่แล้ว +1

    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!

  • @jamiedoig9568
    @jamiedoig9568 3 ปีที่แล้ว

    As a complete new comer to docker and launching WP containers, I found this video extremely useful as well as the comment threads where all my questions were answered already by previous helpful users. +1 Subscriber

  • @savashzaynal6502
    @savashzaynal6502 ปีที่แล้ว +2

    Seriously this is the most clean, clear and on point example. Very underrated.

  • @DrewBombard
    @DrewBombard 2 ปีที่แล้ว +2

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

  • @hexcoreZz
    @hexcoreZz ปีที่แล้ว +3

    Andrew, this was a great tutorial. Keep up the good work, appreciate you putting in the time for this.

  • @blinkapec
    @blinkapec 3 ปีที่แล้ว +1

    Thanks for the non-trivial approach (not just "image: wordpress"), in my opinion it is more flexible and interesting, since teaches some additional details regarding dockerization in general.

  • @Laflamablanca969
    @Laflamablanca969 3 ปีที่แล้ว +4

    You've got a new subscriber in me. Loving the Laravel + Docker tutorials. Cheers

  • @kishanbindal
    @kishanbindal 2 ปีที่แล้ว +3

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

  • @crawfordpaul8188
    @crawfordpaul8188 2 ปีที่แล้ว +1

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

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

    This is the best tutorial that I found about wordpress docker. Thank you for this tutorial, I will continue watching you other videos.

  • @Fabrifix
    @Fabrifix 2 ปีที่แล้ว +4

    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!

  • @codehorror8076
    @codehorror8076 2 ปีที่แล้ว

    This was a nice refresher after spending the last couple of years away from WP and Docker. Half way through the video I was thinking "wp-cli would be so much easier, let me see how I can do that". And then I noticed you discussed it at the end. Doh! It's "Sea el eye" (CLI) and it stands for "Command Line Interface".

  • @PeterMumford
    @PeterMumford 2 ปีที่แล้ว

    This is awesome. Its the best docker-php tutorial yet.

  • @dhiyaaulauliyaa3988
    @dhiyaaulauliyaa3988 2 ปีที่แล้ว

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

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

    This is how a tutorial video should be made. Kudos and many many thanks to Andrew.

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

      I'm glad you liked it, thanks so much!

  • @rushsc_
    @rushsc_ ปีที่แล้ว

    thanks for this awesome tutorial. really helped me to set up a local development environment without resorting to MAMP or something similar

  • @berroubamohamedelamine8667
    @berroubamohamedelamine8667 ปีที่แล้ว

    Every step was clear and clean, very well explained. thanks a lot.

  • @deryckoe84
    @deryckoe84 2 ปีที่แล้ว

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

  •  3 ปีที่แล้ว

    The thing I came here for, and got at the end of the video was how to keep plugin installations in version control.
    The answer seem to be to add a wp-cli container and put the commands to run in a dockerfile. Then, each time you start the service, it will run the wp-cli commands and install the plugins.
    Dunno exactly how or if that's persisted in the db, but I'm guessing it's just persisted in the wp-plugins directory and not in the database.
    Will give it a try on my own installation tomorrow. Thanks for a great, educational video.
    Keep em up, you earned yourself a subscriber!

    • @aschmelyun
      @aschmelyun  3 ปีที่แล้ว +1

      I'm glad you found that part useful! As for persistence, the wp-cli container networks with the same db container that the main wp installation is using, so it should persist as long as you're using a volume on the MySQL container (or don't spin it down).

  • @apted
    @apted ปีที่แล้ว

    Really clear and easy to follow tutorial, many thanks. subscribed!

  • @zunnur1
    @zunnur1 3 ปีที่แล้ว

    this the most well explained video regarding docker. Thank you

  • @aaBeben
    @aaBeben 2 ปีที่แล้ว

    You are the best tutor. Thanks from Indonesia.

  • @buchdev
    @buchdev 3 ปีที่แล้ว +1

    Nice! Your explanation is so helpful, cool and clear! Thanks... I needed this

    • @aschmelyun
      @aschmelyun  3 ปีที่แล้ว +1

      Thank you so much! I'm glad it was helpful.

  • @mantaslukosevicius3175
    @mantaslukosevicius3175 2 ปีที่แล้ว

    Best wordpress-docker set-up video.

  • @hanggianggono3765
    @hanggianggono3765 2 ปีที่แล้ว

    what a quality step by step explanation!

  • @2penry2
    @2penry2 3 ปีที่แล้ว +3

    Such an excellent channel, really appreciate the time you've dedicated to helping us learn new things!

  • @ankuradhey
    @ankuradhey ปีที่แล้ว

    Bookmarked this. Everything covered nicely. 👍

  • @aschmelyun
    @aschmelyun  3 ปีที่แล้ว +49

    If you'd like to see the full code along with some additional helper items, check out the GitHub repo here: github.com/aschmelyun/docker-compose-wordpress

    • @jomaramomas7682
      @jomaramomas7682 3 ปีที่แล้ว

      @andrew schmelyun Have you tried adding xdebug with this and making it work. It's too complicated to set up.

    • @PeterMumford
      @PeterMumford 2 ปีที่แล้ว +2

      I like this plan a lot, but I'm wondering how deployable it is, since the certificates are bound to the NGINX container. Can you do a follow up on a deployment sequence?

    • @aschmelyun
      @aschmelyun  2 ปีที่แล้ว +3

      @@PeterMumford Sure thing! I'll add it to my list.

    • @jenifer5463
      @jenifer5463 2 ปีที่แล้ว

      When i try to clone this repo it don’t work well. As well as you can make another vedio in this particular issue.

    • @jenifer5463
      @jenifer5463 2 ปีที่แล้ว

      Your git repo lots of extra code bit you skip this please you can make full tutorial i hope it will help people who learn More

  • @mmikhan
    @mmikhan 3 ปีที่แล้ว +5

    Excellent Docker tutorial :) Would love to see a similar guide on how to set up up a Test-Driven Development (PHPUnit) for WordPress using Docker!

    • @aschmelyun
      @aschmelyun  3 ปีที่แล้ว +6

      I'll add it to the list!

    • @epfuller
      @epfuller 3 ปีที่แล้ว +4

      Yes, this would be great!

  • @ahmedsayed4140
    @ahmedsayed4140 2 ปีที่แล้ว

    An excellent and informative lesson, Thank you so much.

  • @robotjeans
    @robotjeans 3 ปีที่แล้ว

    Excellent walkthrough

  • @lucatsf
    @lucatsf ปีที่แล้ว

    That video helped me a lot, thanks, man!

  • @user-id9dh3jm3w
    @user-id9dh3jm3w 2 หลายเดือนก่อน

    Awesome!! Thank you for this video!

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

    very helpfull, explained very well how everything works. thanks

  • @ahrorbekmirzaev8332
    @ahrorbekmirzaev8332 3 ปีที่แล้ว

    Great video! Thx for helpful information

  • @bosphoramus
    @bosphoramus 3 ปีที่แล้ว

    Amazing tutorial, thanks

  • @visualmodo
    @visualmodo 3 ปีที่แล้ว

    Excellent WordPress guide!

    • @aschmelyun
      @aschmelyun  3 ปีที่แล้ว

      Thank you! I’m glad you liked it.

  • @hanschannel599
    @hanschannel599 2 ปีที่แล้ว

    thanks, Andrew! I learn a lot!

  • @sleeptheory3934
    @sleeptheory3934 3 ปีที่แล้ว

    This is how tutorial should be made. i wish i could like more.

  • @ajlozadaro
    @ajlozadaro ปีที่แล้ว

    Wow, amazing tutorial!

  • @arifurrahmanarif3478
    @arifurrahmanarif3478 ปีที่แล้ว

    Magnificent content.

  • @laugedyret
    @laugedyret 3 ปีที่แล้ว

    Super video, thanks!

  • @queue6844
    @queue6844 ปีที่แล้ว

    With a few tweaks it worked thanks 🙂

  • @ianfranco1986
    @ianfranco1986 2 ปีที่แล้ว

    awesome tutorial, thanks

  • @patssalaets1153
    @patssalaets1153 3 ปีที่แล้ว

    Fantastic tutorial thanks

  • @alex14pall
    @alex14pall 2 ปีที่แล้ว

    Great tutorial!

  • @AbhinavKulshreshtha
    @AbhinavKulshreshtha 3 ปีที่แล้ว +3

    Amazing Tutorial. I have been using compose-file from others because I always ran into one problem or other. But because of your approach of letting things fail and fixing it, I not only ran wordpress, but also successfully ran laravel setup. Now I will try my hand on Laravel-Vue microservice setup because that is what my actual app is using. I am guessing I just need to create another service called node and try to match ports between them just like you did on fpm?

  • @DevenSitapara
    @DevenSitapara ปีที่แล้ว

    Thank you very very much Andrew

  • @codescholar7345
    @codescholar7345 3 ปีที่แล้ว +6

    Great video! This is exactly what I was looking for. Can you show how to push this to a VPS for production?

    • @aschmelyun
      @aschmelyun  3 ปีที่แล้ว +11

      I'll add it to my video ideas list!

  • @devian3634
    @devian3634 2 ปีที่แล้ว +3

    For anyone having the error establishing database connection. Make sure you set up your database connection in the wp-config.php file, you will initially see there a wp-config-sample.php file. This tutorial skipped it. Nevertheless, good tutorial! Thanks!

    • @aschmelyun
      @aschmelyun  2 ปีที่แล้ว +1

      This is true, and I apologize for that! DB host should be pointing to `mysql`, not the typical localhost.

    • @nomanislam3157
      @nomanislam3157 2 ปีที่แล้ว

      9:56 please help How to get wp-config.php file without copy and paste inside wordpress.. Bcz after that plugin and media Don't word.. After all this is best learning methodology...

    • @koerperkontrolle
      @koerperkontrolle 2 ปีที่แล้ว

      up because I got stuck there too, makes sense thanks

    • @nomanislam3157
      @nomanislam3157 2 ปีที่แล้ว

      By default it was not generated.. Thats problem occur.. How to solve u don’t say that

  • @olekristianmller-hansen4220
    @olekristianmller-hansen4220 10 หลายเดือนก่อน +9

    Hmmm, seems promising, but after creating the nginx/default.conf file and specifying it in the docker-compose.yml file, nginx goes from the default Welcome to nginx page to just showing a generic 403 Access Forbidden page.

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

      same

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

      got any solution?

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

      same, its weird

    • @leolaf6501
      @leolaf6501 4 หลายเดือนก่อน +2

      Check if you miss any semicolons in your config file.
      Also you can run "docker logs -f " followed by the containername of your nginx and see what the error is 😊

  • @Shiroikaz
    @Shiroikaz 3 ปีที่แล้ว

    superhelpful! thank youu amazing

  • @leonardofloripa
    @leonardofloripa 3 ปีที่แล้ว

    great job!

  • @ColmanByrne
    @ColmanByrne 3 ปีที่แล้ว +7

    While WP will run fine , there are some missing modules , gd , imagick , bcmath, exif that can cause some issues with some plugins and themes .
    I would recommend a change to the php.dockerfile to include these , can be left out if you dont need them.
    RUN docker-php-ext-install mysqli pdo pdo_mysql bcmath exif && docker-php-ext-enable pdo_mysql bcmath exif
    RUN set -ex \
    && apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS imagemagick-dev libtool \
    && export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" \
    && pecl install imagick-3.4.3 \
    && docker-php-ext-enable imagick \
    && apk add --no-cache --virtual .imagick-runtime-deps imagemagick \
    && apk del .phpize-deps
    RUN apk add --no-cache libpng libpng-dev && docker-php-ext-install gd && apk del libpng-dev
    of course if you add them , rebuild with docker-compose up -d --build site

    • @jenifer5463
      @jenifer5463 2 ปีที่แล้ว

      After follow YOUR code i cannot compose file getting error.. Can you help

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

    Thank you for this video!

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

      I'm glad you liked it!

  • @behold_band
    @behold_band 2 ปีที่แล้ว

    Perfect tutorial.

    • @aschmelyun
      @aschmelyun  2 ปีที่แล้ว +1

      Thanks Evan! I’m glad you liked it.

    • @behold_band
      @behold_band 2 ปีที่แล้ว

      @@aschmelyun Absolutely, only docker video I've found that understood every step of every file, in plain English. Definitely took that step from complete beginner to more advanced docker user with this video.

  • @SabinMehedin
    @SabinMehedin 3 ปีที่แล้ว +3

    Hi Andrew! Great video. I have one question. From your side, it's a good idea to run multiple WordPress project on the same docker env? For example, in the WordPress folder to have wp1 and wp2. Or should be separated?
    And another question. test1.local make a request to test2.local. Why I receive cURL error 6: Could not resolve host: test2.local?
    Thanks in advance.

  • @desdrianton5993
    @desdrianton5993 2 ปีที่แล้ว

    great tutorial

  • @robeeeeen
    @robeeeeen 2 ปีที่แล้ว

    Thanks Andrew!!!

  • @jonathasborges
    @jonathasborges 2 ปีที่แล้ว

    Excelente conteúdo, obrigado por compartilhar =)

    • @aschmelyun
      @aschmelyun  2 ปีที่แล้ว

      De nada! Obrigado por assistir!

  • @BruceKoehler
    @BruceKoehler 2 ปีที่แล้ว +10

    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

    • @FranciscoSilva-rf3gw
      @FranciscoSilva-rf3gw 2 ปีที่แล้ว

      Hello Bruce, i have the same error, did you manage to solve it?

    • @priyankchouksey7434
      @priyankchouksey7434 2 ปีที่แล้ว +3

      @@FranciscoSilva-rf3gw @Bruce Koehler, it is answered partially though. Add below line in the servers section of default.conf file, above locations
      index index.php;

  • @patricechaula3430
    @patricechaula3430 ปีที่แล้ว

    Thank you very much.

  • @flipperiflop
    @flipperiflop 3 ปีที่แล้ว +1

    If one uses multiple servers, where one has db, other has cache and two others have the webapp itself, would it be smart to have docker only for development, and use some other way to handle the production servers? Or is there a good established way to do this with docker too, where development and deployment have each their own setup? And how would one run only one part of the app on one server?
    Kubernetes might solve the issue, but seems like an overkill for this problem.

  • @josuebarros5727
    @josuebarros5727 2 ปีที่แล้ว

    Docker + Bedrock + Sage = Paradise

  • @mariaalmeida8485
    @mariaalmeida8485 3 ปีที่แล้ว +1

    This tutorial absolutely rocks. I followed the tutorial and used the same example URL, but now that I want to change it I can't (even though I changed it in the default.conf). Any tips how to fix it?

  • @pratikbhetwal3670
    @pratikbhetwal3670 ปีที่แล้ว

    When running the docker through a WSL distro(ubuntu in my case), does the second path you specify in the volumes section in 25.15 exist virtually or should the folder exist on the local machine through manual installation(sudo apt insall nginx) of nginx outside the docker environment? I don't understand how the symlinks work. I'm guessing that the /var/www/html folder doesn't actually exist physically on your device either.

  • @robdorn420
    @robdorn420 3 ปีที่แล้ว +1

    Excellent video again.
    Would be nice if you would make a video on implementing xdebug. Currently struggling to get that working with docker, php and vscode.

    • @aschmelyun
      @aschmelyun  3 ปีที่แล้ว

      Great idea! I love xdebug, I'll be sure to add that to my video list.

    • @ColmanByrne
      @ColmanByrne 3 ปีที่แล้ว

      could Add following to php.dockerfile
      RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
      && pecl install xdebug \
      && docker-php-ext-enable xdebug \
      && apk del -f .build-deps
      needs additional config to setup new mode and ide key etc for new xdebug 3 works as far as loading xdebug in php , but have not figured out the additional configs yet to get it to work on VSCODE , next task !

    • @robdorn420
      @robdorn420 3 ปีที่แล้ว +1

      @@ColmanByrneI have XDEBUG already up and running, but thank you anyway for your response.

  • @ColmanByrne
    @ColmanByrne 3 ปีที่แล้ว +7

    Andrew - for info the line try_files $uri $uri / /index.php?$args; yields a 403 forbidden until you remove the second $uri/ - This is caused because nginx will try to index the directory, and be blocked by itself. Throwing the error.
    try_files $uri $uri/ means, from the root directory, try the file pointed by the uri, if that does not exists, try a directory instead (hence the /). When nginx access a directory, it tries to index it and return the list of files inside it to the browser/client, however by default directory indexing is disabled, and so it returns the error "Nginx 403 error: directory index of [folder] is forbidden". see nginx.org/en/docs/http/ngx_http_autoindex_module.html

    • @heliocorreia1359
      @heliocorreia1359 3 ปีที่แล้ว +2

      add line
      index index.php;
      with that, nginx will search for index files inside /var/www/html

    • @aschmelyun
      @aschmelyun  3 ปีที่แล้ว +2

      @@heliocorreia1359 This is correct. That line was missing from the original video, but is present in the code on GitHub. My apologies!

    • @ColmanByrne
      @ColmanByrne 3 ปีที่แล้ว +1

      No problem , and excellent video in any case , really helped me to understand docker setup , I especially liked you showing what can go wrong and how to fix them ! keep it up

  • @josuebarros-desenvolvedorw2490
    @josuebarros-desenvolvedorw2490 3 ปีที่แล้ว +5

    Wonderful content!
    Please help us setting the Roots Stack Environment on Docker too! (Bedrock, Sage...)

  • @andreasgaschka
    @andreasgaschka 3 ปีที่แล้ว

    Great starter tutorial.
    I have trouble uploading larger files, either media or plugins. Any help here?

  • @user-tt6nc6mo7k
    @user-tt6nc6mo7k 3 ปีที่แล้ว +1

    Clear and concise! Would like to know how you added the custom domain name? Is there a way to have that done automatically similar to laravel valet where the directory name is taken as the domain name?

    • @ColmanByrne
      @ColmanByrne 3 ปีที่แล้ว +1

      Edit your hosts file and add line 127.0.0.1 wordpress-docker.test ( on windows this is in C:/windows/system32/drivers/etc - but edit as administrator !)

    • @jamiedoig9568
      @jamiedoig9568 3 ปีที่แล้ว

      @@ColmanByrne Thanks! For anyone else doing this just add it below the # comments when editting the hosts.file in visual studio code

  • @gasperzargi5715
    @gasperzargi5715 2 ปีที่แล้ว

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

  • @topsydhaka
    @topsydhaka 2 ปีที่แล้ว

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

  • @chandalasaturnino8213
    @chandalasaturnino8213 2 ปีที่แล้ว +1

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

  • @Daan007
    @Daan007 ปีที่แล้ว

    Hi Andrew, great video. this is for localhost what changes do i have to add to deploy this on app service or ACI in Azure? many thank for the reply! have a great day..

  • @buundy
    @buundy ปีที่แล้ว +1

    I downloaded your code and after reviewing the video I customized it for my needs. I can start the nginx, mysql and php but I can see in the Docker Desktop that wp cannot be started, or it stops immediately with this error: "less: unrecognized option: r". Do you have an idea what can cause this? Thanks in advance!

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

    It's a splendid tutorial. Thank you. Just one quibble: at around 11:00, where you say, oh, this is crashing because the PHP mysql extension is missing -- there is no way anybody could infer that from the opaque error message that Wordpress displays. It would be nice to know where the error logs are and see for ourselves.

  • @PathOfDamn
    @PathOfDamn 3 ปีที่แล้ว

    Sorry if this was answered before, but since I'm using windows and I DON'T want to use HyperV for Docker (I'm using VirtualBox for other things), and that I can't really use WSL2 at the moment (can't afford a restart, too many things running LOL), do you think it is recommended that I spin up a debian-testing vm, install docker engine in there, and then through VSCode's Remote Dev extension I develop things with docker in that vm?
    I mean, yea, I can just dual-boot, but I think I'm too swamped with work atm to reorganize my stuff. Sorry if this was a dumb question.

    • @aschmelyun
      @aschmelyun  3 ปีที่แล้ว

      Not a dumb question at all! That definitely sounds like a complicated setup, and I think the solution you laid out sounds pretty good for your scenario. Especially if you're just doing local dev, your VM shouldn't need that much resource allotment for the Docker instance.

    • @PathOfDamn
      @PathOfDamn 3 ปีที่แล้ว

      @@aschmelyun Thanks for the reply, I'm slowly transferring my dev environments over to docker, since VM with snapshots are taking a tad bit too much space for my liking.
      My current environment is more like anything I've not handed off yet or that I need to maintain, I'm sticking with what I had. But any new projects coming my way or things I need to do for the team I'm in, I put them in docker. No doubt my projects are slowly cleaning up, and it's.. a chore, to put it kindly, to reorganize things when everything is being worked on.

  • @hsiehleo4736
    @hsiehleo4736 2 ปีที่แล้ว +3

    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!

    • @erjohn5404
      @erjohn5404 2 ปีที่แล้ว

      same problem lmao, this tutorial is 10 months ago so probably the latest update is fucking us up

    • @erjohn5404
      @erjohn5404 2 ปีที่แล้ว

      have you fixed it?

    • @spouwn
      @spouwn 2 ปีที่แล้ว +11

      in the nginx/default.conf file you need to add this index line in the server configuration:
      root /var/www/html;
      index index.php;

    • @fincampbell
      @fincampbell ปีที่แล้ว +1

      @@spouwn Thanks. This helped me today 😅

    • @lascasermas
      @lascasermas ปีที่แล้ว +1

      @@spouwn thank you so much :)

  • @josepolanco9147
    @josepolanco9147 ปีที่แล้ว

    Hi Andrew!
    I mounted a server without nginx on dockers. I started toying around and dind't follow a guide to make this server https compatible before changing this on the wordpress settings.
    I ended up wrecking my whole docker instance. I ended up erasing also the DB associated with Wordpress. I tried closing down the docker instance and composing up again, but to no good.
    Is there a 'hard-reset' to start all over again?
    Appreciate your help :)

  • @codehorror8076
    @codehorror8076 2 ปีที่แล้ว

    In the wpcli.dockerfile add a RUN command "RUN apt update && apt install mysql-client". If you don't you can not use wpcli, it will complain about mysql not being found.

  • @Oxygen.O2
    @Oxygen.O2 2 ปีที่แล้ว

    thanks!

  • @bd4utonite2
    @bd4utonite2 11 หลายเดือนก่อน +2

    followed you youtube tutorial but can get to nginX but cannot get to wordpress.. something about missing mysqli???

  • @user-sy5ol1gz7s
    @user-sy5ol1gz7s 6 หลายเดือนก่อน

    Hi! Thanks a lot for your content! Could you leave links to src file in descriptions, pls.

  • @SelasNight
    @SelasNight 3 ปีที่แล้ว

    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!

    • @overw0rld
      @overw0rld 2 ปีที่แล้ว

      Add following line to your php.dockerfile:
      ENV PAGER=more

  • @robeeeeen
    @robeeeeen 2 ปีที่แล้ว

    What should be done if multiple wordpress sites needs to configure like virtualhost?

  • @YasserHawass
    @YasserHawass 3 ปีที่แล้ว

    if you're on windows & having troubles following the tutorial after 8:00
    You might need to update File Sharing configuration in your Docker for Windows app to include your work directory :"D

  • @JuanitoOrtega
    @JuanitoOrtega 2 ปีที่แล้ว

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

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

    do you have single Dockerfile with alpine base image installed with wordpress,php,nginx?

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

    Those who got 403 Error, first change the permission of ./wordpress folder. On linux you can do "chmod -R 755 ./wordpress" and if you still get errors just follow the tutorial, the solution starts on 11:12.

  • @LuisPerez-cb4rp
    @LuisPerez-cb4rp 2 ปีที่แล้ว

    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.

    • @LuisPerez-cb4rp
      @LuisPerez-cb4rp 2 ปีที่แล้ว

      I acutally coned your repo and ran it, same issue, might be a local issue im having

    • @erjohn5404
      @erjohn5404 2 ปีที่แล้ว

      same issue lmao

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

    Awesome! How we can create multiple WordPress sites on local this way?

  • @christerjohanzzon
    @christerjohanzzon 2 ปีที่แล้ว +1

    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?

    • @diegogonzalezcruz6952
      @diegogonzalezcruz6952 2 ปีที่แล้ว

      Hi, did you solve it?

    • @jorgearaya4712
      @jorgearaya4712 2 ปีที่แล้ว

      I have the same issue, did some research and WSL2 seems to be the issue, if you have windows on its pro version you can disable it in docker dashboard > settings > General > Use WSL2 based engine

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

      @@jorgearaya4712 hyper-v isn't just faster on Windows, it also uses only 2GB of ram instead of WSL2 which uses 4+ GB when running the wordpress container.

  • @leejenn4779
    @leejenn4779 3 ปีที่แล้ว

    Greatly appreciate and enjoy this video. May i know possible to guide how to make cronjob work in docker? Would like to use real cronjob to execute wp cron event run --due-now instead of default wordpress cronjob.
    Thanks in advanced.

  • @rickpereira8821
    @rickpereira8821 3 ปีที่แล้ว

    At 8:17 I got the error "Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /run/desktop/mnt/host/e/wordpress-docker-test/wordpress"
    Working in Docker for Windows (WSL) so that might be why I'm having such a hard time with this stuff...

  • @masterpayne5982
    @masterpayne5982 2 ปีที่แล้ว +1

    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.

  • @caponero7110
    @caponero7110 ปีที่แล้ว

    Is possible to use Dbeaver for this enviroment? thank you in advance