Docker for WordPress Tutorial



https://truthseekers.io/how-to-setup-wordpress-in-docker/
In this Docker WordPress tutorial, we’ll learn how to setup a WordPress environment in Docker.

When setting up a WordPress development environment in Docker, there’s a couple things you have to pay attention to. That said, it’s pretty simple. You put the WordPress theme and plugin code in their own dedicated folders on your local machine, and mount them into the proper location in the Docker container.

Also, because Docker creates and destroys containers when using docker-compose, you want to setup your WordPress config file (wp-config.php) and have it on your local machine, and use a Dockerfile to mount it to the proper location.

source

Related posts

11 Thoughts to “Docker for WordPress Tutorial”

  1. hello bro… thnaks for everything… But i have this error
    sudo docker cp sublist3r_wordpress_1:var/www/html/wp-config.php ~/Code/tuts/wptut/wordpress

    stat /home/cyberthereaper/Code/tuts/wptut: no such file or directory

    my wordpress and mysql is working. But i can't run this command ? what is problem ?

  2. how come everytime I build the container I have to update it again in wordpress?

  3. Excellent video. Great explanations. It is always fantastic to find someone who can explain every detail and not leave out small points such as specific directory structures or how to start a text editor that cause unnecessary confusion. Bravo Zulu!

  4. Nice vids man. But now how would you deploy this to your staging/prod server?

  5. The colours are too hard to read.

  6. I believe the docker-compose code should be:
    version: '3.1'

    services:
    adminer:
    image: adminer
    restart: always
    ports:
    – "8080:8080"

    db: #because the service name is db the Server for Adminer wiull be db
    image: mysql
    command: –default-authentication-plugin=mysql_native_password
    restart: always
    environment:
    MYSQL_ROOT_PASSWORD: password #default USER is root

    see: https://hub.docker.com/_/mysql/

  7. Code coloring is dark on dark … pretty hard to see …

  8. Nice explanation, thank you!

  9. How is the docker compose working so fast for you? When I add a new image like WordPress, it takes few minutes to download everything but in your video it's instant. Why? Oh, and we also have no web server image running, so how is wordpress able to run?

  10. 2 things. So I have adminer and sql running fine, however when I'm trying to run wp through SSL i'm getting 400 errors and I can't nano, cat, or tail the apache log inside the docker instance for wordpress. (since apache is returning the error) I'm proxy passing this docker through nginx reverse proxy, it works fine on 80, but 443 it just errors. Also when I install a theme and restart with `docker-compose up –build -d` it says my theme is missing.

  11. Great video man, what terminal is that with the multiple tabs?

Leave a Comment