Skip to content

cwp bricks post-types enable

shipped 1.0.0
cwp bricks post-types enable <slug> [env] [flags]

Acts on the local site unless an environment is named.

ArgumentWhat it isDefault
<slug>post type slug
[env]environment to write to (omit for the local site)
FlagWhat it doesDefault
--forceoverride the protected-environment refusaloff
--no-backupskip the remote backup taken before the writeon
--yesskip the confirmation promptoff

Plus the shared flags --json, --verbose and --dry-run.

What it does

Adds one post type to the list the Bricks builder will open for.

Against a remote this is an upward write and carries the guard set: a protected environment refuses without --force, the change is confirmed, and a remote backup is taken first.

The change is database state, so it does not travel. Enabling a post type locally and deploying code will not enable it on production — run the command against each environment that needs it.

Example

cwp bricks post-types enable buch
cwp bricks post-types enable buch prod --force

What it does not do

It does not register the post type. If the slug does not exist on the target, enabling it in this list achieves nothing — the site plugin is what registers it, and cwp deploy is what moves the site plugin.