Skip to content

CLI commands

The ForkPress CLI creates local WordPress branch previews, serves them over HTTP, exposes them as Git branches, and coordinates storage, merge, and diagnostic workflows.

Start with forkpress init, run the preview server with forkpress serve, create branches, then use the Git or merge commands that match your workflow.

Primary flow

StepCommandPurpose
1forkpress initCreate the local site state, runtime files, and main branch.
2forkpress serveStart the preview server in the background.
3forkpress branchCreate, inspect, reset, merge, and delete local branches.
4forkpress cloneClone the ForkPress Git remote into an editing checkout.
5forkpress commitStage, commit, push, and normalize the current checkout branch.

Commands

CommandPageNotes
forkpress initInitSite creation and first admin user.
forkpress serveServeBackground server shortcut for normal preview work.
forkpress startStartForeground server command used directly and by serve.
forkpress stopStopStop matching servers and detach mount-backed storage.
forkpress serverServerBackground server management: start, list, stop.
forkpress branchBranchBranch lifecycle, merging, audit review, and plugin merge helpers.
forkpress branchctlBranchctlAlias for branch.
forkpress remoteRemoteRemote-site cache registration and branching.
forkpress cloneCloneGit clone wrapper with ForkPress defaults.
forkpress pullPullRebase/autostash pull for an existing checkout.
forkpress commitCommitAgent-friendly alias for push.
forkpress pushPushStage, commit if needed, push, then sync the normalized ref.
forkpress agentsAgentsCreate multiple branches and matching Git worktrees.
forkpress gitGitGit passthrough plus local git branch create.
forkpress logsLogsRead or follow WordPress, PHP, server, and maintenance logs.
forkpress doctorDoctorInspect local environment and storage capabilities.
forkpress storageStorageInspect, mount, detach, and compact mount-backed storage.

Global options

OptionApplies toDescription
-v, --versionforkpressPrint the ForkPress version and exit.
--work-dir <path>Site-aware commandsForkPress site state directory. Defaults to .forkpress.
--php-bin <path>Runtime commandsUse a specific PHP binary instead of the embedded runtime command. Mostly useful for development and debugging.

--work-dir points to the ForkPress metadata directory, not the branch directory. In a normal site layout it stays at .forkpress, next to branch directories such as main/ and marketing/.

Production scope

These pages document the production forkpress binary. Experimental commands that only exist in forkpress-dev are intentionally left out of this CLI reference.