Skip to content

WordPress Local Docker - Multisite & Multiple site Docker LEMP with SSL

Notifications You must be signed in to change notification settings

jaredrethman/wld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress Local Docker (WLD)

Yes, just another WordPress Site Local Docker environment. I wanted to create something:

  • Lightweight.
  • Dependency free.
  • Takes care of common installation workflows for different architectures i.e. Multisite.
  • Easily scaffold a wp-content only version controlled project.

Prerequisites

Usage

Once you've cloned this repo, cd into it.

wld scaffold

This is the automated (Recommended) approach.

sh wld scaffold

Answer prompts and/or hit enter/return to select defaults. Once you've responded to last prompt, you should see something resembling below.

WLD Scaffold

If you're happy with the details, respond with y. This will:

  • Create a directory, housing your sites local file system, inside ./sites using the domain you specified.
  • Prompt for password and/or boimetric authentication to generate necessary certs. NB: macOS or mkcert required.
  • Generate site specific Nginx conf.
  • Build docker-compose or restart the nginx container.

Once above has concluded you should see the below in your terminal.

Site created, visit: https://test.local/wp-admin

WP CLI

For ease of use, a command for submitting WP CLI commands to the relevant site on the PHP container was created.

wld site test.local -- wp user list
# Or from within a `sites/test.local` directory
wld -- wp user list

VS.

docker compose exec php wp user list --allow-root --path="/var/www/html/test.local"

Beware:

  • Only subdomain Multisite is supported in wld scaffold
  • Cert generation can only be done on macOS or if mkcert is installed
  • All WordPress sites run on the same Nginx/PHP services. This might change in the future i.e. different PHP/Nginx versions per/site. This is technically possible, but would require manual intervention and remove ablity to stay in sync with this code base.

About

WordPress Local Docker - Multisite & Multiple site Docker LEMP with SSL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published