Sometimes whilst you’re customizing your WordPress site, you’ll need to know the ID of a specific user. For example, you might be adding a snippet that only applies to specific user. Well, it’s really easy to find out the ID of a user from the WordPress backend, as long as you’re an admin:
First of all, make sure that you’re in the WordPress backend. Then on the admin bar on the left of your screen, click on Users.
This will bring up a table of users that are registered on your site. To find out what a specific users ID id, you just need to hover over their username. In the bottom left of your browser, you should see a URL that looks something like this:
The number immediately after
?user_id= is their user ID. So in this example, the user ID is 2:
It’s really that simple!