The local env is nf’s generated WordPress development environment for a project repo.
Create project metadata if the repo does not have nf.json yet:
nf init
Start WordPress:
nf env up
nf env show
nf env up is idempotent. It starts Docker Compose, configures Mailpit SMTP, installs WordPress if needed, and ensures the mounted theme is active.
Rebuild the generated WordPress image when needed:
nf env up --rebuild
nf env show
nf env password
nf env password --db
nf env logs
nf env show prints the site URL, WordPress login, Mailpit URL, and a DB URL prefilled with the database host/user/name.
Generated WordPress config enables WP_DEBUG and WP_DEBUG_LOG, disables debug display, and routes local mail through Mailpit. nf env logs tails Docker logs for the WordPress service.
nf env shell
nf env sh
nf env wp -- plugin list
The generated WordPress Docker image includes useful CLI tools plus wp-cli. nf env shell, nf env sh, and nf env wp run in the WordPress container as docker_user, which defaults to nonfiction and can be changed with:
nf config set-docker-user <user>
nf env down
nf env reset
nf env reset --rebuild
nf env reset is destructive for the local env only. It creates a safety snapshot, removes Docker Compose volumes, and recreates the env. Add --rebuild to rebuild the generated WordPress image during recreation.
Generated env data lives under:
~/.local/share/nf/envs/<project-slug>/
Override for tests or isolated runs:
NF_DATA_HOME=/tmp/nf-data
Local snapshots are covered in Snapshots. Remote data sync is covered in Sync.