This repository contains a Docker configuration for hosting Wordpress with a Nginx web server and MariaDB database.
Make sure Docker is installed in your environment.
To use this repository, follow the following steps:
- Clone it to your environment using
git clone https://github.com/cdterry87/docker-wordpress. Thencdto thedocker-wordpressdirectory you just created. - Copy the
.env.examplefile as.envusingcp .env.example .env. Then set the database and Wordpress credentials to whatever you'd like. - Run the following command to build the Docker container and start it:
docker-compose up --build -dNOTE: If
docker-composedoesn't work, trydocker composeinstead. - Visit
http://localhost:8080in your browser and you should see your Wordpress site! - Visit
http://localhost:8080/wp-login.phpand login with the credentials you set in the.envfile and start editing your site! - To destroy the container, use the following command:
docker-compose down -v