Use WordPress locally with Docker using docker-compose
- nginx
- php 8.0
- wordpress
- mariadb
- phpmyadmin
- wpcli
- mailhog
- redis
- Custom domain for example
myapp.local
- CLI script to create a SSL certificate
Install mkcert:
brew install mkcert
brew install nss # if you use Firefox
Edit .env
filte to your preferences.
cd cli
./create-cert.sh
This script will create a locally-trusted development certificates. It requires no configuration.
mkcert needs to be installed like described in Requirements. Read more for Windows and Linux
Make sure your /etc/hosts
file has a record for used domains.
sudo nano /etc/hosts
Add your selected domain like this:
127.0.0.1 myapp.local
docker-compose up -d