Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

How to Find Post, Category, Tag, Comments, or User ID in WordPress

Last updated on by
Follow WPBeginner on YouTube
How to Find Post, Category, Tag, Comments, or User ID in WordPress

A couple of days ago a user asked us to help them find a post id. While working on WordPress, you may come across situations where you will need to find a post ID, category ID, or tag’s ID. An ID is a unique number which identifies that particular item in your WordPress database. In this article we will show you how to find post, category, tag, comments or user ID in WordPress.

WordPress uses MySQL database to store and retrieve data for your website. Learn more about how WordPress manages your database in beginner’s guide to WordPress database management.

Video Tutorial

If you don’t like the video or need more instructions, then continue reading.

How to Find a Page or Post ID in WordPress

Let’s start with looking at how to find a post ID in WordPress. Login to your WordPress admin panel, and click on the Posts menu. Once you are there, simply click on the Post whose ID you are looking. The post will open in post editor, and you will be able to see the post ID in your browser’s address bar like this:

Finding a page or post id in WordPress

The same method can be used if you want to find page ID in WordPress. The only difference would be that you have to go to the Pages menu instead of Posts.

How to Find a Tag or Category ID in WordPress

Finding a category ID, tag ID or another custom taxonomy ID in WordPress is very similar to finding a post ID. For example, to find the ID of a category, go to Posts » Categories and click on the category name. WordPress will open the category in an editor, and you will be able to see the category ID in your browser’s address bar.

finding category, terms, and tags ID in WordPress

Notice in the screenshot above that even though we are editing a category, WordPress still displays category id as tag_ID. Don’t get confused by this. All categories and tags, are actually terms inside a WordPress taxonomy. They are all handled by the same editor. If you edit a tag in WordPress you will see the same URL format except taxonomy parameter will have post_tag instead of category.

How to Find a Comment ID in WordPress

To find a comment’s ID, first thing you need to do is go to the Comments section in your WordPress admin. Next simply click Edit under the desired comment. WordPress will open the comment in a editor, and you will be able to see the comment id in your browser’s address bar like this:

how to find comment ID in WordPress

How to Find a User ID in WordPress

Similar to other items we discussed above, a user ID can also be found by editing a user. Go to Users » All users and click on the user name. WordPress will open the user’s profile and you can get the user ID from browser’s address bar.

Finding user id in WordPress

If you are trying to find out your own user ID, then WordPress will simply open the profile editor without a user ID in the URL. To find your own user ID, go to Users » All Users. WordPress will display a list of authors with the number of posts they have written next to it. Click on the number of posts you have written, and you will be redirected to a page listing all posts written by you. You will get the user id from browser’s address bar where it will be displayed as author, like this:

Finding author ID in WordPress

We hope this article helped you find post, category, tag, comments and user ID in WordPress. If you have any questions or feedback, then please leave a comment below.


Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »
  • Arup Ghosh

    Great Post, I was wondering to check the IDs of categories.

  • Jean

    Note that finding the user id via ‘Edit User’ won’t work unless he has written at least one post.

  • Abdul Rahim

    Very nice post, If i want to change any post or page id, then what I need do?

  • Robert Neu

    Nice post. :) You can also install this plugin to highlight the IDs more clearly:

    http://wordpress.org/plugins/reveal-ids-for-wp-admin-25/

    • Oliver Schlöbe

      Thanks for suggesting my plugin. :)

    • Srihari Thalla

      Thanks for the Plugin.