A WordPress backend serving up content via the WP REST API
The Wordpress Backend includes:
- An installer script which bootstraps a core WordPress installation: This script installs MySQL and WordPress locally in Docker containers.
- WordPress plugins you need to set up custom post types and custom fields (Advanced Custom Fields and Custom Post Type UI).
- WordPress Plugins which expose those custom fields and WordPress menus in the WP REST API (ACF to WP API and WP-REST-API V2 Menus).
Prerequisite: Before you begin, you need Docker installed. On Linux, you might need to install docker-compose separately.
Docker Compose builds and starts two containers by default: publicsite-db, publicsite-wp:
cd WP-Backend
docker-compose up -d
Wait a few minutes for Docker to build the services for the first time. After the initial build, startup should only take a few seconds.
You can use some useful Docker tools like Kitematic and/or VSCode Docker plugin to follow logs, start / stop / remove containers and images.
With the containers running:
The publicsite-wp container exposes Apache on host port 8080:
- Dashboard: http://localhost:8080/wp-admin (default credentials
thomasmuller/bayernMunich) - REST API: http://localhost:8080/wp-json
The publicsite-db container exposes MySQL on host port 3307.
Thanks to Postlight for their WordPress + React Starter Kit