
Quick Answer: To find a post ID in WordPress, go to Posts > All Posts in your dashboard, hover over any post title, and look at the URL preview in the bottom-left corner of your browser. The post ID is the number that appears between post= and &action. For example, in post.php?post=1234&action=edit, the post ID is 1234. You can also find the same ID in the address bar after opening a post in the editor.
Introduction to WordPress IDs
If you’re new to WordPress, you may have stumbled upon a plugin that asks for a post ID, and become confused. The post title and URL are visible, of course, but the post ID is nowhere to be found.
Now, many WordPress users don’t know how to find the post ID, and they get by just fine. So why might someone need to know it? Usually, it’s a situation like the one above where a plugin asks for it. But many themes will ask for post IDs during configuration, too. A post ID may also be needed when building custom shortcodes, writing conditional PHP that targets specific posts, querying the database directly, or excluding certain content from a plugin’s behavior.
In this post, we’ll walk through exactly where to find the WordPress post ID, so the next plugin or theme that asks for one won’t cause you any delay.
Why WordPress IDs matter
Why do these IDs matter? Well, they’re essentially the backbone of how WordPress organizes content. Each piece of content, be it a post, page, or comment, is stored in the WordPress database with its unique ID. This ID is how WordPress distinguishes between different pieces of content, even if they have similar titles or content.
Unlike post titles or URL slugs, which can change whenever a post is edited, the post ID is permanent. Once WordPress assigns an ID to a piece of content, that number stays the same for the life of the post. That permanence is exactly why plugins, themes, and developers rely on IDs rather than titles. They’re a stable reference point even when everything else about a post changes.
Finding the elusive Post ID
The quickest and easiest way to find a post ID is from the All Posts screen, reached by logging into the WordPress dashboard and selecting Posts > All Posts.
From here, simply hovering the mouse over the post whose ID is needed reveals the answer. The URL preview appears in the bottom left-hand corner of the screen.
That pop-up box contains the post ID.
More specifically, the post ID is the number that comes after the “post=” and before the “&“.

In the screenshot above, the post ID is 110.
Find a post ID from the All Posts screen
- Log in to the WordPress dashboard.
- In the left-hand menu, click Posts > All Posts.
- Hover the mouse over the title of the target post.
- Look at the bottom-left corner of the browser window for the URL preview. It will look something like
example.com/wp-admin/post.php?post=1234&action=edit. - The number between
post=and&actionis the post ID.
The post ID can also be found in the WordPress editor, which opens after clicking on a post.
When done this way, the post ID is in the address bar. The URL shown will be exactly the same, and the post ID is again sandwiched between the “post=” and the “&“.

Both ways are straightforward, and finding a post ID shouldn’t take more than a few seconds.
This approach works identically in the block editor, which has been the default editor in WordPress since version 5.0 and remains standard through WordPress 6.x. Whether the classic editor, the block editor, or the Site Editor is in use, the post ID always appears in the same place in the URL.
Another option: add a Post ID column to the admin list
For anyone who frequently needs post IDs, typing or copying them from a URL gets tedious. A lightweight alternative is to add a dedicated ID column to the All Posts, All Pages, and Users screens. There are plugins that do this, like Reveal IDs, or you can add a short snippet to a child theme’s functions.php file that registers a new “ID” column in the posts table.

Either approach makes every post, page, and user ID visible at a glance. Remember to always back up the site before editing theme files.
Understanding IDs beyond posts
But it’s not just posts that are assigned a custom ID number that’s difficult to find. Every page, category, tag, comment, and user on a WordPress website will also have a unique ID number.
These ID numbers can be found in exactly the same way as Post IDs. In the case of a category ID, the path is Posts > Categories from within the WordPress dashboard.
From there, hovering over the target category reveals the URL in the bottom left corner, same as before.

The category ID is found after “category&tag_ID=” and before “&” as seen in the screen grab above.
Alternatively, clicking on the category reveals the category ID in the URL.

Here’s a quick reference for where to look for each type of ID and what to look for in the URL:
Page ID
Go to Pages > All Pages, hover over a page title, and look for the number after post= (pages use the same post.php URL structure as posts).
Tag ID
Go to Posts > Tags, hover over a tag, and look for the number between tag_ID= and &post_type.
Comment ID
Go to Comments, hover over the Edit link under a comment, and look for the number after editcomment&c=.
User ID
Go to Users > All Users, hover over a username, and look for the number between user_id= and &wp.
Media / Attachment ID
Go to Media > Library, switch to list view, hover over an item’s Edit link, and look for the number after post=.
In every case, the pattern is the same. Hover, then read the URL preview in the bottom corner of the browser.
Frequently Asked Questions
What is a WordPress post ID?
A WordPress post ID is a unique number that WordPress automatically assigns to every post, page, custom post type, and other content item when it’s created. The ID is stored in the wp_posts database table and is used internally to reference that specific piece of content.
Where is the post ID stored in WordPress?
Post IDs are stored in the ID column of the wp_posts table in the WordPress database. Every post, page, attachment, and revision gets its own row and its own unique ID.
Can a post ID change?
No. Once WordPress assigns an ID to a post, that ID is permanent. Even if the title, slug, category, or publication date changes, the only way a post ID changes is if the post is deleted and re-created, or if content is re-imported into a new database.
What’s the difference between a post ID and a post slug?
A post slug is the human-readable part of a URL (for example, how-to-find-post-id in yoursite.com/how-to-find-post-id/). A post ID is a number used internally by WordPress. Slugs can be edited, IDs cannot.
Do pages and posts share the same ID sequence?
Yes. WordPress uses a single, shared ID sequence for all content stored in the wp_posts table, including posts, pages, attachments, and custom post types. That means a post and a page will never share the same ID.
Why isn’t the post ID visible in the URL?
Most WordPress sites use “pretty permalinks” (like /post-name/) that don’t include the post ID. To see the ID, hover over the post in the admin dashboard or open it in the editor. The ID appears in the admin URL (post.php?post=123), not the public-facing URL.
Is there a function to get the current post ID in code?
Yes. Inside the WordPress loop, get_the_ID() retrieves the current post’s ID. Outside the loop, get_queried_object_id() works, as does referencing the global $post object with $post->ID.
Final thoughts
Anyone who has struggled to configure a theme or use a plugin because a post ID was nowhere to be found should now have a clear answer. Understanding and utilizing these IDs can significantly enhance the ability to manage and customize a site, making the WordPress experience smoother and more efficient. Keeping the method in mind means no wasted time the next time a plugin or theme asks for an ID.
The good news is that even as WordPress has evolved, through the block editor and full-site editing, the method for finding post IDs hasn’t changed. The hover-and-check-the-URL trick that worked a decade ago still works today, and it’ll almost certainly still work in future versions of WordPress.

