cwp content list
shipped 1.0.0cwp content list [env] [flags]
Acts on the local site. Name an environment to act there instead.
| Argument | What it is | Default |
|---|---|---|
[env] | environment to read (default: default_environment in cwp.yml) |
| Flag | What it does | Default |
|---|---|---|
--with-agent | with —dry-run on a host with no shell: install and remove the PHP agent so the plan is real | off |
Plus the shared flags --json, -v, --verbose, -q, --quiet and --dry-run.
What it does
Lists everything a content group claims on the local site or on an environment.
The scope covers the posts of its post_types, the terms of its taxonomies
and the menus under its menus:.
The command answers “what would --all mean here” before you type --all. On
a site you have not looked at in a while, that question is worth asking.
The output is a table, sorted by type and then slug. The site’s own order is post-id order, and that order interleaves the types:
type slug id status tracked
– bricks_template event-einzelansicht #12801 publish site only
✓ menu primary #24 in tree
✓ page angebote #150 publish in tree
✓ term category/news #7 in tree
tracked says where the row lives. in tree means a content group carries
it and it travels; site only means it is in scope and nobody has pulled it
yet. status is WordPress’s own post_status, passed through verbatim. It
is empty for a term or a menu, which have none.
A term’s slug column is <taxonomy>/<slug>, the place its file sits in the
tree: content/terms/category/news.yml. A menu is menu, not nav_menu.
WordPress stores one as a taxonomy term, and the tree does not carry it as one.
The command names a taxonomy declared in content: that the site does not
register in a warning rather than passing it over. A plugin switched off on one
environment is a real difference between two sites. An empty listing looks the
same as a site with no such term.
--json carries all three, in data.posts, data.terms and data.menus,
each with the uid the table shows only as in tree / site only.
Example
cwp content list
cwp content list prod
cwp content list --json
What it does not do
It writes nothing, on either side, and it does not compare anything.
cwp content status is the one that says what differs.