An environment is a collection of cloud resources, dedicated to running your WordPress applications. Environments are completely isolated from one another.
A namespace allows users to deploy a separate WordPress application into an existing environment, under a different directory.
Note that namespaces in a single environment are not isolated. They typically share a Linux user, the php-fpm pools, Nginx configurations, database servers, etc. If you are looking for isolation, we recommend using a separate environment instead.
By default, when a new project is created with
sail init, a brand new environment
is provisioned for that application, and the application itself is deployed
cd path/to/primary sail init
If you'd like to add a secondary application to the same environment, use the
cd path/to/secondary sail init --namespace=secondary --environment=path/to/primary
This will use the same environment as the primary application, and provision a
new WordPress application under the
Note that most Sail commands will operate under the current namespace, so for
sail backup inside the
path/to/secondary Sail project directory, will
perform a backup of the
secondary namespace only.
If you'd like to delete a namespace, from the project directory where the namespace was created, simply run the usual:
If you'd like to destroy the entire environment, you can add the
flag. This will destroy all namespaces and shut down the servers.
If you're stuck and need help with namespaces, environments or Sail CLI in general please visit the getting help section.