A starter repository for WordPress websites for organisers, campaigns and anyone else who finds it useful.
This folder structure uses the Bedrock pattern, a modern WordPress stack.
- Docker installed
- Node.js - LTS version, 14.17.1. If using NVM, you can use
nvm use
in this directory. - PHP and Composer installed locally. If not, you can use them in containers provided, prefixing all Composer commands below with
docker-compose run composer <command>
- Generate a repository from this template
- If you have PHP and Composer installed locally you can run from this directory
composer install
. Otherwise runcomposer install
via Docker withdocker-compose run composer install
. - Copy
.env.example
to.env
, runningcp .env.example .env
. The example file contains variables required for this Docker Compose setup but modify details appropriately as per the Bedrock documentation as required. - Start up all containers in the background with:
docker-compose up -d
- You can access the site at http://localhost:8082. You can view logs by running
docker-compose logs
.
MySQL is provided by MariaDB.
MySQL data is persisted between Docker Compose ups and downs. To start again, you can run composer run-script clear-database
.
WP-CLI is installed in the wordpress
container.
docker-compose run wordpress wp --allow-root <command>
Note WP-CLI will not work on the host machine, as WordPress configuration refers to databases within the Docker network, not the host machine.
Update composer.json
with the version you want for roots/wordpress
and then run:
docker-compose run composer update roots/wordpress
Run docker-compose run composer require wpackagist-plugin/plugin-name
.
Documentation for Bedrock is available at https://roots.io/bedrock/docs/.