---
title: "How to Find Post Details Using WP-CLI"
description: "In This Tutorial: List Post Details List Page Details WP-CLI allows you to manage your WordPress website(s) from the command line. It's even simple to gather important details about your existing..."
url: https://www.inmotionhosting.com/support/edu/wordpress/wp-cli/how-to-find-post-details-using-wp-cli/
date: 2018-02-21
modified: 2021-08-16
author: "InMotion Hosting Contributor"
categories: ["WP-CLI"]
type: post
lang: en
---

# How to Find Post Details Using WP-CLI

## In This Tutorial:

[List Post Details](#list-post-details) [List Page Details](#list-page-details)

[*WP-CLI*](/support/edu/wordpress/wp-cli/) allows you to manage your WordPress website(s) from the command line. It’s even simple to gather important details about your existing content, like posts/pages for example. These details are needed in the syntax of commands to manipulate the various components of your website. In this guide, you will learn how to **list details** of your *Posts* and *Pages* using **WP-CLI**.

## List Post Details

*Posts* can be easily found, using the *wp post list* sub-command. The instructions below, will guide you through the process of **listing the details** of your **Posts**, using **WP-CLI**.

1. [SSH into your server](/support/server/ssh/shared-reseller-ssh/) as the cPanel user that owns the website you would like to work with.
2. Use the cd command to switch to the [document root directory of your website](/support/website/where-to-upload-files/). Example: cd **public_html/wp** **NOTE: **Be sure to replace **public_html/wp** with the actual path to the document root directory of your website.
3. Run the following command: wp post list The output will be similar to the example below: exampl3@example.com [~/public_html/wp]# wp post list +----+----------------+------------------+---------------------+-------------+ | ID | post_title | post_name | post_date | post_status | +----+----------------+------------------+---------------------+-------------+ | 39 | Blogging 101 | blogging-101 | 2018-02-21 16:17:58 | publish | | 40 | Basic...nomies | basic-taxonomies | 2018-02-21 16:17:58 | publish | | 41 | Tips...Writing | tip...er-writing | 2018-02-21 16:17:58 | publish | +----+----------------+------------------+---------------------+-------------+

## List Page Details

Since *Pages* are stored in the same manner as *Posts*, you can use the *wp post list* sub-command to find details about the *Pages* for your website. The instructions below will guide you through the process of **displaying details** for your **Pages** using **WP-CLI**.

1. [SSH into your server](/support/server/ssh/shared-reseller-ssh/) as the cPanel user that owns the website you would like to work with.
2. Use the cd command to switch to the [document root directory of your website](/support/website/where-to-upload-files/). Example: cd **public_html/wp** **NOTE: **Be sure to replace **public_html/wp** with the actual path to the document root directory of your website.
3. Run the following command: wp post list –post_type=page The output should be similar to the example below: exampl3@example.com [~/public_html/wp]# wp post list --post_type=page +----+-----------------+-----------------+---------------------+-------------+ | ID | post_title | post_name | post_date | post_status | +----+-----------------+-----------------+---------------------+-------------+ | 42 | About Us | about-us | 2018-02-21 16:17:58 | publish | | 44 | Clients | clients | 2018-02-21 16:17:58 | publish | | 46 | Gallery | gallery | 2018-02-21 16:17:58 | publish | | 48 | Resume | resume | 2018-02-21 16:17:58 | publish | | 50 | Info | info | 2018-02-21 16:17:58 | publish | | 52 | Testimonials | testimonials | 2018-02-21 16:17:58 | publish | | 54 | Contact Us | contact-us | 2018-02-21 16:17:58 | publish | | 37 | Home | home | 2018-02-21 16:17:57 | publish | +----+-----------------+-----------------+---------------------+-------------+

Now that you are familiar with how to locate the details of Pages and Posts, you will be able to specify the details needed in the syntax of WP-CLI commands. 

Learn more about [WP-CLI](https://www.inmotionhosting.com/support/edu/wordpress/wp-cli/), the command-line interface for WordPress, and how to streamline your WordPress maintenance workflows!
