How to find user ID?


Build your own WordPress Support Plan

Expert, yet affordable WordPress support & maintenance plans.
View our pricing

Many functions that we write about require you to know what the user ID is and we get asked a lot about how to find the user ID. Just as with posts, pages, categories, etc, the ID is very easy to find and almost always just a matter of viewing the preview URL when hovering over the user to you need the ID in the user list.

First, in your WordPress admin go to Users > All Users. Hover your cursor over the user that you want to find the ID.

1. Find the User ID in WordPress Dashboard

Find User ID in WordPress

While hovering your cursor over the user check the preview URL at the bottom of your browser, in Chrome this will be at the bottom left or right of the window as below in our screenshot.

Find User ID in WordPress

You will see the URL contains ‘user_id=XXXX’ this number is the user’s ID.

2. See All WordPress User IDs (Using the Reveal IDs Plugin)

If you want to see all user’s IDs in your WordPress dashboard you can use the Reveal IDs plugin.

After activating this plugin just head to Users>all users and you’ll see a column with the user’s ID.

image 29

This plugin is a great way to display WordPress user IDs in the admin for quick reference.

3. Get the Current User ID (using PHP)

The easiest way to get the currently logged-in user ID with PHP is to use the get_current_user_id() function. This is the ideal solution if you’re building custom code and need the currently logged-in user’s ID.

echo 'The current logged in user ID is: '.get_current_user_id();

For more information on finding user ID, let us help you accordingly, from start to finish, with one-Time fixes, custom plans, or monthly routines for your WordPress website.

Written By
Founder of WP Helper.
You will also like these articles

Relax Knowing Your WordPress Site Is Secure & Running Smoothly 24/7

Let us manage your WordPress site, everything from security to updates will be taken care of. Support plans also come with dedicated support so we can do anything from adding content to customising your site for you.

Same Day Professional WordPress Support

Get WordPress Support Today

Need help with a single WordPress problem, today? We can help with anything from adding analytics tracking code to site hack recovery. Full money back guarantee on all jobs.

1. Submit a Support Request

Use our support ticket form below to send details of your problem to our developers.

2. Get a Quote

We will review your request and provide a quote within 24 hours (but usually within a few hours).

3. We fix your WordPress problem

Our team will begin fixing your WordPress problem the same day.

4. 100% Money Back Guarantee

If we can’t fix the problem for the amount quoted we will refund you 100%.

  • Do you have a screenshot of the issue or have a copy of the theme or plugin that is at fault? If you want to upload php, html or css please zip first.
    Drop files here or
    Accepted file types: jpg, jpeg, png, pdf, zip, gzip, rar, doc, txt, Max. file size: 15 MB, Max. files: 10.