For the complete documentation index, see llms.txt. This page is also available as Markdown.

Installation

Get a full Planet 4 development environment to your local machine

We are using wp-env as a base and pulling all necessary themes and plugins so that you can develop for your website more easily.

System Requirements

Platform specific steps

Install basic system dependencies:

sudo apt install -y git make unzip apt-transport-https ca-certificates curl gnupg-agent software-properties-common

Install docker and docker-compose. We prefer to install it from upstream, to have the latest version:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io

Add your user to the docker group to avoid using sudo on every command:

sudo usermod -aG docker ${USER}

Refresh your group membership by running:

su - ${USER}

To verify that everything works you can just run the hello-world docker container:

docker run hello-world

Mac with Apple silicon (M1, M2, etc.)

Install Rosetta 2:

softwareupdate --install-rosetta

then download and install Docker Desktop from the official documentation:

https://docs.docker.com/desktop/install/mac-install/

Mac with Intel chip

Download and install Docker Desktop from the official documentation:

https://docs.docker.com/desktop/install/mac-install/

In order to run the Planet4 development environment in Windows you'll need to enable Windows Subsystem for Linux (WSL). WSL allows you to run a Linux environment within Windows. You'll need to enable WSL and install Ubuntu. The current version (WSL 2) comes with a lot of enhancements and better disk performance. You can follow the installation instructions here.

Here is a post with some more detail about setting up WSL 2 (and many other tips for Windows devs!)

Note: this guide was created using the Ubuntu 20.04 image.

Verify WSL 2 and the Ubuntu image are installed

From a Powershell window, run this command to see the installed distros:

You should see the distro you installed in the list, with the WSL version: Ubuntu 20.04 - 2

Make sure WSL is enabled

Look here for more details. and set version for a specific distribution:

Install docker

Follow official documentation on Docker on WSL2.

Troubleshooting

In case the WSL version for your distro is 1, you can update it using:

WSL 2 Networking Issues: https://github.com/microsoft/WSL/issues/5336

Docker Issues: https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlesslyhttps://stackoverflow.com/questions/63497928/ubuntu-wsl-with-docker-could-not-be-foundhttps://github.com/docker/compose/issues/2738

sudo pip3 install -IUq docker-compose

See https://docs.docker.com/docker-for-windows/wsl/ for details.

Makefile: 212: recipe for target 'start' failed

Segmentation fault

https://github.com/microsoft/WSL/issues/4694#issuecomment-556095344

Before anything

  • Clone the develop repo:

  • Set node version:

  • Install npm packages:

  • Check the requirements:

Installation

Install default developer environment with:

NRO environment

For NRO developers, use instead:

Clean up

All commands

Workflow

  • Themes are installed under planet4/themes

    • the theme is usually cloned by the installer and should be modifiable right away

    • you can add or create any theme in this folder, it will be available in your local instance

  • Plugins are installed under planet4/plugins

    • you can add or create any plugin in this folder, it will be available in your local instance

Resources

Last updated