Get last published post in WordPress using wp-cli June 8, 2022 by Tarik Billa Simply add: --posts_per_page=1 to limit the queried items to a single item.