Skip to content

wp-net/wordpress-docker-compose

 
 

Repository files navigation

Deploy Wordpress on Localhost and in Production using Docker Compose

Related blog post:

The installation tool kit, provided here, include:

  • Nginx web server
  • MariaDB/MySQL used for Wordpress database
  • phpMyAdmin interface to connect to your MySQL database
  • WP-Cli: Wordpress Command Line Interface
  • Makefile directives for automatization.

You can automatically deploy a local docker wordpress site in 5 minutes using the following commands:

# Download a wordpress docker-compose example
git clone https://github.com/kassambara/wordpress-docker-compose
cd wordpress-docker-compose
# Build and start installation
docker-compose up -d --build

Visit your site at http://localhost and your database via phpMyAdmin at http://localhost:8080.

Default identification for your wordpress website admin:

  • Username: wordpress and
  • Password: wordpress

Default identification for the phpMyAdmin interface:

  • Username: root and
  • Password: password

Useful set of commands to know:

# Stop and remove containers
docker-compose down
# Build, and start the wordpress website
docker-compose up -d --build
# Reset everything
docker-compose down
rm -rf certs/* certs-data/* logs/nginx/* mysql/* wordpress/*

References

About

Deploy Wordpress on Localhost using Docker Compose

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 74.7%
  • Makefile 18.1%
  • Dockerfile 7.2%