https://github.com/jaredrethman/wld
WordPress Local Docker - Multisite & Multiple site Docker LEMP with SSL
https://github.com/jaredrethman/wld
Last synced: 2 months ago
JSON representation
WordPress Local Docker - Multisite & Multiple site Docker LEMP with SSL
- Host: GitHub
- URL: https://github.com/jaredrethman/wld
- Owner: jaredrethman
- Created: 2024-02-08T14:32:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-27T01:48:57.000Z (4 months ago)
- Last Synced: 2025-03-23T10:51:08.406Z (2 months ago)
- Language: Shell
- Homepage:
- Size: 118 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
- Docker: https://docs.docker.com/get-docker/
- Docker Compose v2: https://docs.docker.com/compose/install/## Usage
Once you've cloned this repo, `cd` into it.
### `wld scaffold`
This is the automated (Recommended) approach.```bash
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.
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](https://github.com/FiloSottile/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](https://wp-cli.org/) commands to the relevant site on the PHP container was created.```bash
wld site test.local -- wp user list
# Or from within a `sites/test.local` directory
wld -- wp user list
```
VS.
```bash
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](https://github.com/FiloSottile/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.