wordpress quick installation with docker on your own pc
Quick Installation:
- install docker
- start docker
- download the docker-compose.yml file
- open terminal and start wordpress:
docker-compose -f path/to/docker-compose.yml up -d
Login wordpress:
- go to your local website:
http://localhost - login with
username: connygu
password: codehamster
Login phpmyadmin:
- go to your phpmyadmin:
http://localhost:8080
username: connygu
(no password)
Your data path:
- wordpress path: ~/my_docker/docker_volume/wordpress
- mariadb path: ~/my_docker/docker_volume/mariadb
- phpmyadmin path: ~/my_docker/docker_voume/phpmyadmin
Stop wordpress:
docker-compose -f path/to/docker-compose.yml stop
Start wordpress:
- method 1:
docker-compose -f path/to/docker-compose.yml start
- method 2:
docker-compose -f path/to/docker-compose.yml up -d
Remove wordpress:
- stop wordpress:
docker-compose -f path/to/docker-compose.yml stop
- remove wordpress docker container:
docker-compose -f path/to/docker-compose.yml rm
- delete wordpress path: ~/my_docker/docker_volume/wordpress
- delete mariadb path: ~/my_docker/docker_volume/mariadb
- delete phpmyadmin path: ~/my_docker/docker_voume/phpmyadmin
Reference:
- docker: www.docker.com
- docker-compose reference: https://docs.docker.com/compose/reference/overview/
- Bitnami wordpress docker hub: https://hub.docker.com/r/bitnami/wordpress/
- Bitnami phpmyadmin docker hub: https://hub.docker.com/r/bitnami/phpmyadmin/
Hi, i’m trying to use your docker compose config, but I can´t load the wordpress admin page localhost:80, the phpMyAdmin works if I use the localhost:8080, I don´t know what is happening
Hi, I found the problem, mounting local folders in a non-root container is problematic, so you can fix it adding to the docker-compose.yml this:
fix-mariadb-permissions:
image: ‘bitnami/mariadb:latest’
user: root
command: chown -R 1001:1001 /bitnami
volumes:
– /tmp/data/mysql:/bitnami
More info here: https://github.com/bitnami/bitnami-docker-mariadb/issues/136#issuecomment-354644226
Hi Txavi, thanks very much for the correction!
[…] wordpress quick installation with docker on your own pc […]