How to find your Page ID and Post ID in WordPress

If you’ve been using WordPress for any significant amount of time, you’ve probably come across a situation where you need to find a WordPress page ID or post ID.

WordPress gives every piece of content on your site its own unique ID number.

Without getting too much into database structure, let’s just say that this helps WordPress keep track of all the different pieces of content on your site.

Whenever WordPress needs to serve up content, it uses the ID number to find each specific piece of content. Which means that if you want to query/target specific content, it can be handy to know how to find WordPress page and post IDs.

Do you need to find a WordPress page ID or post ID but not sure where to look? Then, you need to read on.

In this tutorial, we cover two quick and easy methods to view page and post IDs within your WordPress dashboard — one using a WordPress plugin and one without. For each strategy, we have laid out clear and actionable steps to enable you to easily find your WordPress page and post IDs. Let’s get started.

 

Finding your WordPress page ID or post ID is an extremely quick process. To find a page ID, open your WordPress dashboard and click on Pages > All Pages.

Open All Pages

Then, select the page that you need to find the ID for. Here, I have chosen my Contact page:

Contact Page

Once the page has opened, you need to look at the URL in your web browser’s address bar. Here, you will find the page ID number displayed within the page URL.

WordPress Page ID

To find out a WordPress post ID, follow the same procedure. Log into your WordPress dashboard, then select Posts > All Posts.

Posts All Posts

Click on a specific post that you need the ID for. Once you are in the post Editor, view the post’s URL in your web browser’s address bar to find the ID number.

Post ID