---
title: "How to View Page Content Using WP-CLI"
description: "InMotion Hosting's WordPress Hosting includes WP-CLI. This intuitive tool allows you to maintain your WordPress websites' content directly from the command line, as an alternative to using the..."
url: https://www.inmotionhosting.com/support/edu/wordpress/wp-cli/how-to-view-page-content-using-wp-cli/
date: 2018-03-05
modified: 2021-08-16
author: "InMotion Hosting Contributor"
categories: ["WP-CLI"]
type: post
lang: en
---

# How to View Page Content Using WP-CLI

InMotion Hosting’s [WordPress Hosting](https://www.inmotionhosting.com/wordpress-hosting) includes WP-CLI. This intuitive tool allows you to maintain your WordPress websites’ content directly from the command line, as an alternative to using the Administrative Dashboard. In this guide, you will learn how to **display the content of a Page**, from the Command Line, using the *wp post get* command, in **WP-CLI**.

## View Page Content

First you will need to [find the ID of the Page](https://www.inmotionhosting.com/support/edu/wordpress/wp-cli/how-to-find-post-details-using-wp-cli/#list-page-details). You can use the *ID* to identify and manipulate each Page in **WP-CLI**. Once you find the Page ID, you can use the *wp post get* subcommand to find the content of a particular Page. To **view the content of a page**, simply follow the steps below.

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](https://www.inmotionhosting.com/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 get **##** –field=post_content **NOTE: **Be sure to replace **##** with the *actual ID of the Page* you are working with.

The output will be similar to the example below:

exampl3@example.com [~/public_html/wp]# wp post get 42 --field=post_content <div class="boldgrid-section"> <div class="container"> <div class="row gridblock"> <div class="col-md-6 col-xs-12 col-sm-12"> <h2 class="">The Write Stuff</h2> <h4 class="">A Better Copywriting Service</h4> <div class="row gridblock"> <div class="col-md-12 col-xs-12 col-sm-12"> <hr></div> </div> </div> <div class="col-md-6 col-sm-12 col-xs-12">   </div> </div> </div> </div> <div class="boldgrid-section"> <div class="container"> <div class="row gridblock"> <div class="col-md-6 col-margin-bottom col-xs-12 col-sm-12"> The concept for my company was a team effort. After chatting with local copywriters at a marketing expo, founder Janet Riley wanted to create a business where marketers and copywriters could work together to create a message that clients could genuinely get behind while driving sales for that client. Tired of the continuous process of finding clients, wooing them into hiring her for projects and then having to start over again once the project was complete, she dreamed of a better way.
Now that you are familiar with a *Page ID*, you can use that ID to **view the Page content**.

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!
