There are many cases where you may need to find a page ID or post ID in WordPress. For example, you may need to provide specific post IDs in the settings for a pluginA plugin is a software component that adds specific features and functionality to your WordPress website. Esse... More, or you may need to reference a post in your template files.
Unfortunately, WordPress doesn’t make this as obvious as it could be—so in this tutorial we’ll cover exactly how to find the ID of a page or post.
What Are WordPress Post IDs?
Every piece of content in WordPress has a unique numerical ID. This includes postsA post is a type of content in WordPress, a popular open-source content management system used for creating an... More, pagesIn WordPress, a page is a content type that is used to create non-dynamic pages on a website. Pages are typica... More, media attachments, categoriesIn WordPress, categories are a fundamental taxonomy used to group and organize posts based on their topics or ... More, tagsIn WordPress, tags are a taxonomy used to classify and organize posts. They are similar to categories, but unl... More, and custom post typesA custom post type is a feature in WordPress that allows users to create their own content types, beyond the d... More.
Whenever WordPress needs to serve up a piece of content, it uses the post ID to query the databaseA database is an organized collection of data stored and accessed electronically. It is a crucial component of... More for the content and related metadata.
Here’s what that looks like in the database:

This unique identifier is important because it’s static. Post titles may change; slugsIn WordPress, a slug is the unique text that appears in a URL to identify a specific page or post. This term i... More may change—but post IDs never change.
This is why plugins that need to include or exclude posts (e.g. a related posts plugin or a social sharing plugin) will often ask you for specific post IDs.
But how do you find a post ID in the WordPress dashboardIn WordPress, the Dashboard is a central hub for managing a website's content and settings. It is the first sc... More?
How To Find A Post ID Or Page ID In WordPress
Finding a WordPress page ID or post ID is pretty simple, though it’s a little unintuitive.
When you edit a post or page in WordPress, the post ID number will appear in the URL:

Look for post=NUMBER
in the URL. That number is your post ID.
The same principle applies to pages:

How To Find A Category ID Or Tag ID In WordPress
Unsurprisingly, you can follow a similar process for other types of WordPress content.
For taxonomiesIn WordPress, a taxonomy is a way of grouping content together based on shared characteristics. It is used to ... More such as categories and tags, open the taxonomy list by going to Posts > Categories
or Posts > Tags
, then click “Edit” near the category/tag you want to identify.
Once again, you’ll want to look to the URL. For taxonomies, you’re looking for a string like tag_ID=NUMBER
. That number is the ID of your category/tag.

How To Find A Media Attachment ID In WordPress
To find the ID of an image or other media attachment in WordPress, go to Media > Library
in your dashboard, locate the item you want to identify, and click on it.
This will bring up the “Attachment Details” screen.
Once again, you can find the ID in the URL. For media attachments, it will appear as item=NUMBER
. That number is the media ID.

How To Show Post IDs In Your WordPress Dashboard
If you need to view the IDs of your WordPress content regularly, you probably want a more efficient and user-friendly solution.
If that’s you, I recommend that you install the free Reveal IDs plugin, which adds a new ID column to the WordPress “edit” interface.

This makes your IDs easily accessible for posts, pages, categories, tags, and custom post types.
If you want to hide this column for a particular post type, simply open the “Screen Options” menuIn WordPress, a menu is a collection of links that are displayed as a navigation menu on a website. Menus are ... More and uncheck “ID” from the list:

Final Thoughts
Knowing how to find a post ID or page ID in WordPress can really come in handy when you need to reference specific content on your site.
While using the URL trick can get the job done, you may want to install the Reveal IDs plugin if you need easier or more frequent access to your post IDs.
In any case, if you have any questions about WordPress post IDs, please feel free to leave them in the commentsComments are a feature of WordPress that allow users to engage in discussions about the content of a website. ... More below!