Skip to content

cwp widgets push

shipped 1.0.0
cwp widgets push [env] [flags]

This name is an alias. The work moved to cwp push --only widgets, and that page documents it. This spelling still runs for one minor cycle.

Acts on the local site. Name an environment to act there instead.

tree → site

ArgumentWhat it isDefault
[env]environment to write (default: default_environment in cwp.yml)
FlagWhat it doesDefault
--forceoverride the protected-environment refusaloff
--no-backupskip the remote backup taken before the writeon
--yesskip the confirmation promptoff
--with-agentwith —dry-run on a host with no shell: install and remove the PHP agent so the plan is realoff

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

What it does

Replaces the contents of every widget area the tree describes. Against an environment it is an upward write under the full guard set.

Whole areas, in order. A widget has nothing to match on but its position and its settings. The push therefore does not reconcile widget by widget. What is in the area and not in the file is gone, and the confirmation says so.

The push frees the old instances from their widget_<type> option as it replaces them. A repeated push therefore does not grow that row forever.

What it does not do

  • It does not touch an area the tree does not describe.
  • It does not write a menu reference it cannot resolve. A widget pointing at a menu the target does not have is a named failure, and the area keeps what it had.
  • It does not create widget areas. Those come from the theme; a file naming one this theme does not register is a refusal.