Count WordPress posts by status
how many posts does my wordpress site have | count draft posts wordpress | count published pages | wp-cli | posts | statisticswp post list --post_type=post --post_status=any --field=post_status --path=/var/www/vhosts/example.com/httpdocs | sort | uniq -cPrints the number of entries of the chosen post type for each status, such as publish, draft, future or private. Use page or a custom post type as the type to count other content. Useful for a quick overview before a relaunch or SEO audit.
Note: any excludes trash and auto-drafts. Query those separately with --post_status=trash.
Also searched as
- how many posts does my wordpress site have
- count draft posts wordpress
- count published pages