wmm
As a developer
I want to work on WP plugins/themes
Without overcomplicated local environment.
As a developer
I want to script my particular edge cases
So that my local environment can accommodate them.
Summary
Setup a simple WordPress local environment in a few minutes, using Multipass and shell scripting. It's currently suitable for bundle-less WordPress plugin and theme development that doesn't require a task queue and content search.
Provisioner features:
- Provision a server using a list of scripts, ran in alphabetical order.
- Allows multiple instances with dynamic hostnames
- All tooling is installed in the guest.
WordPress Features:
- All supported PHP versions (8.0-8.2) and latest WordPress. Only maintained PHP versions can be installed.
- Object cache using Redis
- Full page caching using Surge
- Self signed HTTPS using Caddy
- Minimal default theme using Susty
- Pretty permalinks
Requirements
- https://multipass.run/
- A working knowledge of bash scripting.
You do not need to know Docker or Ansible, Terraform or Chef, because this project keeps it simple.
Installation
- Run
./host.shthen provide the admin/database password when asked. - Reset your environment by running the
reset.shscript.
What's with the name wmm?
Advanced use
How to use a custom hostname
The hostname is based on the directory the scripts are running in. To provide a custom hostname prefix host.sh
or reset.sh with WMM_HOSTNAME=myhostname eg: $ WMM_HOSTNAME=dolly ./host.sh. Note: WMM_HOSTNAME values should
not include periods of tlds, the domain for the environment will end in .multipass.
How to setup an environment using a different PHP version
- Change the version string in
00-config.sh. The environment will be setup with the requested PHP version.
How to add multiple PHP versions on a single environment
- Login to the shell
multipass shell <hostname>for examplewmm. Once in the guest, runinstall_php <major.minor>for example8.2. Switch PHP versions by runningswitch_php <major.minor>