1. Home
  2. Wp-cli
  3. Count all posts

This command searches for all posts in the database and returns the count number.

#wordpress#cli
wp post list --format=count 
copy
Full Wp-cli cheatsheet