Giter Site home page Giter Site logo

wld's Introduction

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.

wld's People

Contributors

jaredrethman avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

wld-sh

wld's Issues

Cache WordPress cURL requests

When cli/install-wp-fs.sh runs (i.e. scaffolding) WordPress is downloaded on every call.

Store different versions of WordPress in a non version-controlled directory for easier cloning during installs i.e.

  • ./.cache
    • ./latest
    • ./6.4.3
    • ./6.4.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.