Moggach / website

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WordPress Starter

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.

Requirements

  • 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>

Run locally

  1. Generate a repository from this template
  2. If you have PHP and Composer installed locally you can run from this directory composer install. Otherwise run composer install via Docker with docker-compose run composer install.
  3. Copy .env.example to .env, running cp .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.
  4. Start up all containers in the background with:
docker-compose up -d
  1. You can access the site at http://localhost:8082. You can view logs by running docker-compose logs.

Full development documentation

MySQL

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

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.

Updating Wordpress

Update composer.json with the version you want for roots/wordpress and then run:


docker-compose run composer update roots/wordpress

Adding WordPress Plugins

Run docker-compose run composer require wpackagist-plugin/plugin-name.

Further Documentation

Documentation for Bedrock is available at https://roots.io/bedrock/docs/.

About

License:MIT License


Languages

Language:PHP 55.0%Language:HTML 24.1%Language:CSS 17.8%Language:Shell 1.4%Language:Dockerfile 1.0%Language:JavaScript 0.6%