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

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

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
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 experts 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 »


  1. Edward says:

    You didn’t show how to find the tag’s id. Is anyone know how to find the tag id?

  2. AnnieR says:

    I’m trying to find a user id, this is what my url looks like when I’m editing the user.


    Can’t see anything in there that might be a user id!

  3. Salvatore lobello says:

    I found the video very helpfut.

  4. Vinay says:

    Hey guys,

    How to find the siteID of a wordpress site?

    Thanks in advance.

  5. Ejaz Khan says:

    Thanks so much,

  6. Bikramjit Singh says:

    Hi,,How can i find a particular post in the post list if i have the post ID number?

  7. O G says:

    Hi. It seems that you can’t find your own user ID because what shows up in the address bar is this: “…/wp-admin/profile.php?wp_http_referer=%2Fdemo%2Fdynamik%2Fwp-admin%2Fusers.php

    Looks like you have to login with another username to check your own user id.

  8. Arup Ghosh says:

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

  9. Jean says:

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

  10. Abdul Rahim says:

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

  11. Robert Neu says:

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

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.