-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating readme with macOS instructions (to start)
- Loading branch information
1 parent
ea0189b
commit 3a73f15
Showing
2 changed files
with
111 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,114 @@ | ||
# wp-local-env | ||
[Cross OS WordPress local development environment](https://jonathanbossenger.com/2022/05/25/configuring-ubuntu-in-multipass-for-local-web-development-on-a-macbook/) | ||
|
||
[Development notes](https://gist.github.com/jonathanbossenger/618dab103e21f2774aef0a94a234e87d) | ||
## Introduction | ||
|
||
wp-local-env is a cross OS (macOS, Windows, Linux) local development environment for WordPress. It is built on top of [Multipass](https://www.docker.com/) for minimal overhead and the fastest possible boot time. | ||
|
||
## Requirements | ||
|
||
1. [Multipass](https://multipass.run/) - as this is built on top of Multipass, you will need to first install it for your operating system. | ||
|
||
You can find the Multipass installation instructions [here](https://multipass.run/install). | ||
|
||
2. [mkcert](https://github.com/FiloSottile/mkcert): mkcert is a simple tool for making locally-trusted development certificates which require no configuration. | ||
|
||
You can find the mkcert installation instructions [here](https://github.com/FiloSottile/mkcert#installation) | ||
|
||
### Recommended mkcert installation for MacOS | ||
|
||
1. Install [Homebrew](https://brew.sh/) | ||
|
||
``` | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
``` | ||
|
||
2. Install mkcert with Homebrew | ||
``` | ||
brew install mkcert | ||
brew install nss # if you use Firefox | ||
``` | ||
|
||
Once mkcert is installed, run the following command to install the root certificate in your local keychain: | ||
|
||
``` | ||
mkcert -install | ||
``` | ||
|
||
### Recommended mkcert installation for Linux | ||
|
||
1. Install certutil. | ||
|
||
``` | ||
sudo apt install libnss3-tools | ||
-or- | ||
sudo yum install nss-tools | ||
-or- | ||
sudo pacman -S nss | ||
-or- | ||
sudo zypper install mozilla-nss-tools | ||
``` | ||
|
||
2. Install [Homebrew](https://brew.sh/) | ||
|
||
``` | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
``` | ||
|
||
3. Install mkcert with Homebrew | ||
``` | ||
brew install mkcert | ||
brew install nss # if you use Firefox | ||
``` | ||
|
||
Once mkcert is installed, run the following command to install the root certificate in your local keychain: | ||
|
||
``` | ||
mkcert -install | ||
``` | ||
|
||
### Recommended mkcert installation for Windows | ||
|
||
1. Install [PowerShell](https://docs.microsoft.com/powershell/) terminal. | ||
|
||
2. Install [Chocolatey](https://docs.chocolatey.org/en-us/choco/setup#install-with-powershell.exe) package manager for Windows in Powershell | ||
|
||
3. Install mkcert with Chocolatey | ||
|
||
``` | ||
choco install mkcert | ||
``` | ||
|
||
Once mkcert is installed, run the following command to install the root certificate in your local keychain: | ||
|
||
``` | ||
mkcert -install | ||
``` | ||
|
||
## Installation | ||
|
||
### macOS | ||
|
||
Once you have the [requirements](#Requirements) installed, you can install wp-local-env by running the following command: | ||
|
||
``` | ||
curl -o- https://raw.githubusercontent.com/jonathanbossenger/wp-local-env/trunk/macos/install.sh > install.sh | ||
chmod +x install.sh | ||
./install | ||
``` | ||
|
||
#### Installing the hosts record | ||
|
||
Once the installer is complete, run the following command to add the initial hosts record to your system: | ||
|
||
``` | ||
sudo sitehosts | ||
``` | ||
|
||
This will add a record pointing to the wp-local-env instance and map it to the url `wp-local-env.test`. You can change this url to access the instance in your browser. | ||
|
||
If everything worked, you should see the default Debian Apache2 page in your browser. | ||
|
||
![Apache 2](assets/debian.png) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.