A quick start guide
Pre-Reqs
- Docker installed
- PHP Composer installed
Steps
composer create-project roots/bedrock my-project
cd my-project
ln -s web html
as Apache will serve /var/www/html by default, this saves us from having to change that- Create a
docker-compose.yaml
with the following:version: '3.1' services: wordpress: image: php:7-apache restart: always ports: - 8080:80 volumes: - .:/var/www db: image: mysql:5.7 restart: always environment: MYSQL_DATABASE: database_name MYSQL_USER: database_user MYSQL_PASSWORD: database_password MYSQL_RANDOM_ROOT_PASSWORD: '1' volumes: - db:/var/lib/mysql volumes: db:
vi .env
to changeDB_HOST='localhost'
toDB_HOST='db'
docker-compose up
- Open http://localhost:8080
Going Further
Installing a theme:
composer require wpackagist-theme/hestia
More info: https://wpackagist.org, https://roots.io/docs/bedrock/master/composer/