This solution is for self-hosted WordPress sites, not wordpress.com websites.
Don’t know where to find a WordPress Post or Page ID? Here’s how to find it fast.
How to Find a Page ID in WordPress
First, login to your site and visit the Pages menu in your admin dashboard. Then, click on the Page that you need an ID for.
Now in the edit screen, look at the URL in your web browser.
The Page ID is the number in the URL. This URL tells us that the Page being edited has an ID number of 61.
You can use this same trick to find a Post ID, Category ID, or Tag ID in WordPress. Just visit the Edit screen in your dashboard, and locate the ID number shown in the URL.
How to Quickly Find Many Page/Post IDs
Now you know where to look when you need to find an ID. However, if you find yourself looking for IDs often, you may want a faster method.
In this case, check out the Reveal IDs plugin. It makes finding IDs a bit easier because it displays the Post and Page IDs in the admin menus. This can save you a lot of time if you need to get IDs from many Posts or Pages.