Finding the WordPress Page ID

In WordPress versions prior to 2.5 we could see the Page and post IDs in the WordPress admin panel. But from WordPress 2.5 and later, these are not displayed directly in your dashboard.

Here’s how you can find the IDs in WordPress 2.5 and later.

One Way

After you’ve logged into your WordPress dashboard, Go to Manage > Pages and from the list of Pages hover over the Page title you want to find the ID of. Every time you hover over, your browser’s status bar will show you a URL ending with a number like this.

http://www.xyz.com/wp-admin/page.php?action=edit&post=6

The number with which the URL ends is the Page ID (6 in this case).

Another

If you don’t see anything when you hover over, click on the Page link to open edit Page screen. Now, look in your browser’s address bar and you’ll find the URL ending with a number. and that is your Page ID.

wordpress page id

Again, the number with which the URL ends is the Page ID (6 in this case).

212 Comments

  1. Scott Hone says:

    Awesome! Thanks.
    -Scott

  2. Christian_R says:

    Thanks!

  3. Marco says:

    Thanks!

    Weird that WP hides the pageID. It is of limited to no use for the average user, but when you get into custom php code it may be very useful.

  4. Anthony says:

    Unless WordPress is set to rewrite the URL’s … ?

  5. base says:

    Anthony: In that case, you can use the first method. even with mod rewrite on, the administration panel will still show a pages ID.

  6. Mankosas says:

    Just found this post on Google and it helped, thanks.

  7. Rob Lewicki says:

    Great post! Thank you.

  8. Herb says:

    Thanks for helping me find the page id for my wordpress blog!

  9. sikis says:

    Thank you soo mach

  10. Nick says:

    Thanks. I already changed my slugs, and was having a hard time trying to find the page #s!

  11. Tacchi says:

    you made my day. thanks ;)

  12. mark says:

    how do you find the page id of the index blog?
    I’m using custom fields to use a dynamic banner for each page (using an if else statement). I use the page IDs for the pages to show a certain image.
    Funny how something like this I can’t solve after searching around for a bit.
    So in summary, I need the page id for home (and home, index, and 1 don’t seem to work). any ideas?

    thanks : )

    • David says:

      I need the page ID for the home page. Any ideas?

    • Just found this information at wordpress.org:

      In the theme’s header.php file, change the tag to this
      <body>

      On the homepage, your body tag will now say
      You can now override any existing styles for just that page.
      For example, in your present stylesheet, your sidebar is defined as
      #sidebar { width: 220px; }

      If you add this to the stylesheet:
      body#homepage #sidebar { width: 175px; }
      on the homepage only the sidebar will display as 175 pixels. On all other pages it continues displaying at 220 pixels.

      It works, I was able to set up a custom menu with this.

  13. Peter says:

    Is it possible to get the url (permlink) to a page if you have the page id?
    Thanks, Peter

  14. Trat map says:

    As mentioned by others, the second method only works if you don’t mess with the permalink settings (and you should – since a textual url is better SEO-wise).

    Anyway, thanks for primepress. Very comfortable to tweak.

  15. Paul says:

    Thank you for your generous help.
    Finding the the WordPress Page ID is such a silly little thing but was driving me around the bend trying to identify how to find it.

    Thanks for a great website and packing it full of practical information.

  16. bayrak says:

    thank you admin very very nice blogs :D

  17. bayrak says:

    Hey, nice post, really well written. You should post more about this. I’ll certainly be subscribing.

  18. Unless WordPress is set to rewrite the URL’s … ?

  19. Nice, Thanks Ravi that is great. I cannot believe it is as simple as using Manage > Pages I wish I knew that before as it would have saved me hours of messing around!

  20. mark says:

    hey, great post…

    How would I find the page ID of the home page? The url info that appears for the home page does not have ID info, and I need the ID to modify a template (Atahualpa)

  21. Thanks!

    Isn’t it incredible how one can waste so much time over not knowing silly details like this one.

    Wonderful!

  22. Thanks Guys. Wonderful

  23. have been reading about this a lot recently – what a brilliant idea – saved me tons of wasted time.

  24. Fred says:

    Thanks so much for this! This is so incredibly odd! Yes, I did change the permalinks to suit me, and short of exploring the database, would never have found this. I’m off to glue my hair back in.

  25. oguzhan says:

    Wikipedia is great!

  26. oguzhad says:

    Thanks Guys yeah!!!

  27. Yes, i will use this and try. Hope it will work.

  28. Randall says:

    I’m using WordPress, a theme from iThemes and Ecto on my Mac OS 10.5

    I found the “hovering” tags, but they don’t include the page ID, just the page title. Any ideas why mine are gone and where else I could find them? I want to remove the About and Contacts pages from my pages sidebar widget, and I can’t without the proper ID.

    Thanks!

  29. the jodi says:

    You’re an angel. This was exactly what I needed. Thank you

  30. jcnjr says:

    thanks! this post was top search result for “how to find wordpress page id”.

  31. thanksssssss….. broooooo….
    Its very help me…..

  32. Walt Dowdy says:

    Thanks Ravi! Simple posts like this will live forever.

  33. Lei-Lei says:

    Thank you very much for this! Really helpful xD

  34. vusi says:

    thanks, why cant they just put it in the bloody admin panel somewhere!

  35. i looking this page id, thanks for the explaining.

    Great design.

  36. Thanks! it helped alot. I had modified my URL’s to a custom one and then didn’t think I still had page id’s. But this post helped.

  37. Tyler says:

    Thanks this was helpful

  38. nophindahoz says:

    great bro! it really helps when i’m customising my blog… thank u very much! regards from indonesia :D

  39. Harshida says:

    Hello,
    i have question that in my WordPress with CMS site i have 6 page all, each page have page id

    for example ABOUT PAGE url is like
    http://localhost/wordpress/?page_id=178

    but what i want insted of page_id=178 i want
    http://localhost/wordpress/?ABOUT.
    Give me the solution for this.

    Thanks
    Harshida Parmar

  40. Thanks…. That was a complete pain in the ass to find…

  41. Nick Polino says:

    Straight and to the point, thank you very much.

  42. driver27 says:

    Up to 20 percent of the metals can be lost in a crusher. ,

  43. Another Thanks. This is one of these annoying little things that you find out how to do and then by the time you need to know again the next time you forget and have to find out all over again :( . But thanks to Google and sites like yours it’s easily solved :D

  44. masa subur says:

    I already fine my page id, thanks for article.

  45. Rose says:

    Thank i was wondering about that to find out my past posts. I am using Rosehost Web Hosting and its a very good host for wordpress sites. haven’t got any problems with them.

  46. good point.Thanks so much for sharing these useful informations.

  47. Sometimes wordpress can make you crazy. Thanks for making it simple ;-)

  48. Marcia says:

    Thanks! Had never needed to know the page id; then today, I was in a hurry to get a new template going – and Google found you,

  49. Hi Ravi,

    nice post. I use permalinks and I was searching for the page id… :)

    Thanks Again

    George

  50. Acai says:

    Great post! this will help me to customize my blog based on the page ID, a real beauty! Thank you for sharing ;)

  51. Blake says:

    This helps so much. I was just about to punch my computer in frustration.

  52. Cheers Ravi, clear and concise instructions. Many thanks.

  53. passang says:

    Thanks. Your post solved my problem.

  54. Alec Hanson says:

    Sooooooo Simple I had to kck myself for not thinking about it!

    Much appreciated.

  55. John Writer says:

    Been struggling with how to noindex a downloads page for some weight loss plr I was making – i needed the wordpress ID and couldn’t work it out. This really helped so thanks a lot!

    John

  56. CT says:

    I am looking to change my “blog” page in WordPress. One of my static page links in the navigation is off center. I want to get it looking better. HOW DO I MANIPULATE THE CODE TO DO THIS IN THE BLOG PAGE? http://wisdom360.cc/?page_id=2 WHERE IS THIS FILE FOR ME TO CHANGE? IS IT CSS? IS IT .PHP? I can see the source code, but can’t seem to find where to change it in my template appearences editor. Thanks!

  57. Tony Stark says:

    Just what I needed! Thanks, friend!

  58. Dave says:

    Ah man – this was driving me nuts!
    Thanks!

  59. Mahindra says:

    Thanks a lot, this was really helpful.

    Peace

  60. Tim says:

    Thanks!

  61. paul says:

    Saved me quite a bit of time. Thanks!

  62. Simon says:

    Thanks!

  63. moonpixel says:

    Thanks a lot mate, saved me some time…

  64. Jen says:

    Thank you! This was driving me crazy.

  65. NET-TEC says:

    Great. I dont know, why they removed the ID from the admin. It was surely a step back in userfriendlyness.

  66. Ray says:

    I needed to create a sitemap page for my WP blog ASAP and your post helped me do it very quickly. Thanks a million!

  67. Stephen says:

    IDs absolutely should be shown in admin just like in Joomla, etc. Incredible that you have to fiddle about to find such basic stuff.

  68. Saz says:

    Thank you!!

  69. Paula says:

    Great help, thank you very much!!!

  70. Soryvatry says:

    ambien buy ativan = ambien where to ambien = ambien overnight ambien = ativan order vicodin = ambien buy vicodin

  71. bee says:

    Thank you for these tipps.
    As the first one didn’t work for me and I didn’t want to open lots of pages, I got the idea to look for a plugin for this. And here it is, works fine: http://wordpress.org/extend/plugins/restore-id/

  72. Maren says:

    Thanks for the directions. Maybe I have a newer version of wordpress, because I clicked on “shortlink” to get the ID. But, only one of my pages had a number, the other three had a letter at the end. When I was trying to “exclude” from my widget, only the one with the number worked. Any ideas??

  73. haxpor says:

    Thanks for this info.

  74. cna training says:

    mines still having trouble =(

  75. veedles says:

    nice one- thanks :)

  76. creative says:

    Thanks for your post, excellent value for me. I have just been working with pages widget and wanted to exclude some of the pages.
    Your second method worked great!!!

  77. TinPM says:

    Many thanks. One of those little things you can waste hours trying to resolve.

  78. Andy says:

    Hi, this is useful information and I knew that for a while now. The reason why I decide to post a reply is that I have an extended question: Let’s say I build a WordPress site with 50 – 100 pages or so…. the work to find the id of each page would take very long time if I want a complete overview. Very often I exclude pages in my solutions and when doing that I must know the id of the page… so is there a solution to list all my pages to create an overview in a text document or similar if I want to simplify the job that otherwise would have taken a long time?

  79. Max says:

    Wowza! Thanks, finally!

  80. Jay Castillo says:

    Just what I was looking for. Thanks a million! I needed this to exclude some pages from showing adsense. Worked like a charm!

  81. Cupid Dating says:

    I have been searching every where in my installation to figure this one out. Should have came here first. Thank-you

  82. Kriell says:

    Thank you 5 million times this took me forever to figure out,

  83. Jkeltonga says:

    Awesome! This has been driving me nuts trying to figure out what the page id is. I can’t for the life of me understand why it does not display in dashboard. Kinda stupid on the part of WordPress, if you ask me (so, please don’t ;-) . Thanks for this little nugget of gold.

  84. christian says:

    I cant believe it! That’s so easy!!! Thank you so much!!

  85. Bob says:

    There is no “Manage” on my dashboard anywhere…. any help?

  86. Amy says:

    Thank you SO much for this helpful post…I would have been guessing the page IDs for hours!

  87. thank you for helping me to find page ID.
    Why WordPress made it so hard to find? :)
    Impossible for beginners! It seems like such a simple task,
    but it isn’t if you don’t know where to look. BIG thanks.

  88. Hector says:

    Thanks for the info it was driving me crazy!

  89. Kenneth says:

    Thank you so much, it saves my time searching for page id in wordpress

  90. Benito III says:

    I am having a though time reading your website great share, great article, very useful for me…thank you

  91. ashy says:

    thx for the great knowledge to share with us,really its work will save the time.
    legalized marijuana

  92. ashy says:

    thx for the great knowledge

  93. Kathy says:

    Thanks for the info! I believe you were the first page I found on Google. Great job! :D

  94. great article – many thx for sharing and the wp news. regards tom

  95. Thanks for this great post. So, now I can use exclude pages ID at the Sidebar

  96. Great! I will try this out!
    Thanks for the great post!

  97. Kristina M. says:

    Great share, great article, very usefull for me. Your thought of article is very much creative and interesting to read.

  98. markus says:

    why are we looking for page id?? i mean is really that useful??

  99. I have frequented your port before. The more I take in, the more I keep coming back!

  100. drt says:

    Got a new template that needs page id and google brought me to you. Thank you!

  101. Its simple. But I wonder why WordPress has not given a feature in their admin interface for age id….anyways thanks for this.

  102. Thanks for that tip. I was using url rewriting in my blog and needed to find the id of a few pages I dind’t want to show in a widget. Thanks for the tip. The hard part will be not forgetting where to find it.

  103. josh says:

    Thanks this rocks.

  104. jack says:

    thanks for the useful tips

  105. clara says:

    great post!!!

  106. Deran says:

    Many thanks for this. I’ve been wasting my time a lot trying to figure out that the ID is. :)

  107. Peach says:

    Thanks! your post saved me a lot of time. (^^)

  108. Jennifer says:

    Hi. I was trying to find the page id but I’m using permalinks so your tips above don’t help me. Any other way to find them? I’m a newbie with WP.

    I also reviewed almost all the comments and some ask the same questions but no one ever answers the question.

    Maybe it’s not possible? Maybe I have to go back to the default find the number??

    HELP!

    Thanks in advance.
    Jennifer

  109. Tony Brown says:

    This has been a great help for me so thank you.

    Pension Advice Manchester

  110. A Question:

    On my blog the page URL looks like this: http://www.domain.com/?p=4
    I noticed that the multiple page numbers are skipped on the sub-sequent post. For example, I had a post that had this URL: http://www.domain.com/?p=120, the next post I made had this URL: http://www.domain.com/?p=130.

    Any idea why the page numbers are not in sequence? I’d expect it to be p=120, then p=121, p=122, etc. How do i make them to be in sequence?

    Thanks.

  111. aulya says:

    great!! thanks so much! :*

  112. Milind Lokde says:

    Thank you very much. I have used wordpress more as website and less as blogs. So there are many pages and the top level menus were increasing and affecting my site title. I couldn’t reduce the menu items without knowing the Page Id. Again thanks for this simple but very important information.

  113. mfajrinet says:

    Veru usefull for me, thx.

  114. Janna says:

    Thanks for the post. However, it doesn’t work if you’ve reset your permanent link structure to include the post name and category for example (better for SEO).

  115. alamin says:

    Great post also! Your writing is so fresh in comparison to most other bloggers. Thanks for writing when you get the chance to, I’ll be sure to keep visiting!

    Thanks
    Md.Alamin Khan

  116. liton says:

    Great article on social media. This article points out some good information about how social media is a big factor on business

    Thanks
    Liton mia

  117. Amy says:

    Thanks so much for this information just what i neede!

  118. Kirill says:

    This id work and this is siply, big thanks and more regards.

  119. lpn programs says:

    That’s a great tip. I think with this kind of stuff, Joomla is the best. You get everything right in the administration page listed next to the articles.

  120. Pragam Kumar Srivastava says:

    This has been a great help for me so thank you.

  121. Matbaa says:

    Thanks, good information

  122. Mauricio says:

    Great info, thanks

  123. thanks, so simple yet sooo annoying!

  124. Sune says:

    This very helpful and great info. Thanks a lot!

  125. Ron says:

    Great tip. Just started using the “Share and Follow” widget and I had to disable it on specific pages (about, contact, etc.)

  126. John says:

    Brilliant, Thanks Man. I know they have some sort of plugin but this makes it so much better. I hate bogging down my admin with tons of plugins.

  127. Does this work to find the ID on WP 3.0.1 as well?

  128. Eugen says:

    Thank you! I was having a hard time trying to find page id’s. I need it for displaying only some pages on the nav bar. Thanks again!

  129. It would have really helped if it said something else instead of “post=x” in the URL. I thought of doing the hover-over-link method you described but when i saw the number I thought “wait…maybe this isn’t the page ID, clearly this is a post ID of some sort.” =/

  130. You are a life saver……

  131. Thank you for this, I have been so frustrated trying to remove some of the pages from the menu bar

  132. Really? says:

    This has got to be the biggest non-answer to a non-question Ive ever seen. Jesus, why bother. When people are looking for the answer to “how do I get the page id” they’re looking for a clue to some php code, not a tosser telling them how to read a URL.

    Tool

  133. Great post also! Your writing is so fresh in comparison to most other bloggers. Thanks for writing when you get the chance to, I’ll be sure to keep visiting!

    Thanks

  134. neody says:

    how to get all page id or category id whitout clicking they one by one?

    * sorry for my bad english :)

  135. Stink Bugs says:

    Thanks gosh… you are first on Google for “wordpress Page IDs”. I have been trying to omit some pages using the page ID and have a difficulty locating them. Your 2nd explanation works for me. Thanks

  136. Thank you for making the trustworthy effort to discuss this. I feel very strong about it and wish to learn more. If it’s OK, as you acquire extra extensive wisdom, might you mind including more articles similar to this one with more information? It might be extraordinarily useful and helpful for me and my friends.

  137. Leyton Rhys says:

    Thanks for providing a SIMPLE and QUICK description of how to find the page ID numbers. I can’t believe it was so easy.

  138. Thanks! This helped out with a client’s site! Big time saver.

  139. James says:

    Awesome!! Thanks for the tips

  140. Nicholas says:

    Thanks man, was almost driving me around the bend as well :)

  141. Sam Munro says:

    You’re a life life saver, cheers Ravi

  142. Rosalyn says:

    Thank you!

  143. El Golfo says:

    The problem was so big and now the solution is so easy.
    Thank you very much.

  144. Erwin G. says:

    I want to thank you for the tip.

  145. TakeALeaf says:

    Thank you! Just the info I was after – your tip fixed my problem in a matter of seconds. Much appreciated!

  146. Phillip says:

    Awesome, thanks for your post!

  147. I had problem to find page id but i just chanage permalinks to page id and take a look than change it back to /postname/

  148. Flak0u says:

    thanks a lot!!!!! i was about to go crazy!!

  149. kiks says:

    Thanks for this info I have been pulling my hair on this one. Thanks to theme junkies who laded me to this site.

  150. Thanks for this informations!

  151. panoet says:

    I have changed my permalink to another style that doesn’t include that ID. Now how?

  152. andriyan says:

    problem solved. i can edit wordpress template according my choice.
    thanks.

  153. Joerg says:

    THX for the hint with the page id while using permalinks!

  154. Sandra says:

    Too easy! Thanks for posting tip about finding page IDs.

  155. Hahaha.. :)
    How stupid I was… :)
    I just installed a WordPress Article Directory plugin and had to mention the page ID of the one I created to use as Author Panel to submit Articles and to edit profile etc.
    Thanks Man!!
    Your Post Really Helped me.

  156. Great. I was trying to exclude a few pages from the menu and couldn’t find the Page ID. This worked.

  157. Some Guy says:

    ***Update***

    http://www(dot)yoursite(dot)com/wp-admin/post.php?post=100&action=edit

    With this structure of url we can easily tell that the page id is 100, just in case you guys don’t see the id at the end.

  158. HVAC Raleigh says:

    Wow. This saved me a lot of time. Especially helps when using the ‘no 404 errors’ plugin for redirects. But what is the ID for the home page? I’m using Thesis, if that helps.
    Either way thanks for the post!

  159. Megan says:

    Thanks! Always happy to use someone else’s brain so I don’t have to fire mine up.

  160. Clyde says:

    I don’t know how many times I’ve seen the URL, without “seeing” it. Just one of those things one tends to overlook, but that is one of the bigger things that make TechTrot
    popular.

    Thanks very much for all your help :)

  161. HVAC Boston says:

    This was such a simple fix. Thank you!

  162. I’m hoping this post hits #1 so people can find this solution right away. Visited 3 other posts before finding this simple ID trick. Duh! Talk about a time saver.

  163. Abdul says:

    Superb. Thanx a lot.

  164. Nathalie D. says:

    thanks for the tip, really helpful to exlude pages from the sitemap!!

  165. Joseph Cohen says:

    Thanks so much!

  166. mike says:

    nice post really help me alot. Something the page ID don’t show in the end like you mention in your post but it also like this post=108&action=edit.

    So here 108 is the page ID.

    Thanks

    Mike Dizor

  167. When i click on edit page
    this link appears
    “http://telecomgyaan.com/wp-admin/post.php?post=2614&action=edit”
    Whatcould be the problem
    Now is it page id or what..!!

  168. Kimchi says:

    This is great, I was getting really frustrated because I simply needed to find the page ID but since it won’t show if you have a page slug. Thanks a million!

  169. san says:

    lol…thanks alot, i was worried abt this since long ago.. :)

  170. Lucas says:

    Thank you! This has been driving me crazy for the last 20 minutes.

  171. S M.ALI ZAIDI says:

    thank You!

  172. Thanks for the tip TechTrot. It is always these little things that never get mentioned that cause problems. You go round and round trying to find an answer and then there it is. Someone has the answer. Thanks again

  173. HVAC Orlando says:

    This saved me! Thanks Tech Trot. You’d think this would be info WP would put on their dashboard!

  174. Erin says:

    COuld not find this. I looked…the url does NOT end in any number. THoughts?

  175. Graeme says:

    Hey Techtrot, thank you for the quick answer. Much appreciated.

    Graeme

  176. Hi Ravi

    Thanks for the tip, I just installed a WordPress Article Directory plugin and had to mention the page ID of the one I created to use as Author Panel to submit Articles and to edit profile etc.

    I Also Just started using the “Share and Follow” widget and I had to disable it on specific pages (about, contact, etc.)

    Thanks Ravi

    Paul

  177. Kristin says:

    Ravi,

    Thank you for this post. I almost pulled my hair out searching the WordPress forums, but then I stumbled upon this post with a quick Google search. I will definitely be visiting your site more often, great information.

    Kristin

  178. Peann says:

    Thank you for this. I have custom permalinks and still found the number in the page when I went in to edit it as in mysite.com/wp-admin/post.php?post=19&action=edit. So 19 is the id number. I am using my pages down the right hand side as the navigation so it was great to be able to exclude some.

    Many thanks.

  179. Tony Sale says:

    This has been most helpful, thank you

  180. Nathalie D. says:

    if you go to settings/permalinks you can choose what you want to use in the urls, the default one has the page id.
    hope this helps,
    Nathalie

Trackbacks / Pingbacks

  1. [...] 418 is the pageID of the page you want to add comments to. See this post on how to obtain the pageID of a page in WordPress. To add multiple pages do [...]

  2. [...] the Page ID and the image file name according to your site. (parts marked in [...]

  3. [...] should replace the “post-63″ bit to match the ID of your own WordPress page ID. (TechTrot explains how to find your page ID here). This works great but personally I’ve never been a fan of hidden [...]

  4. [...] I did eventually find the wonderful instructions over here on TechTrot. The instructions there are a couple of years old, but they still work fine. Thanks for that! [...]

  5. [...] Exclude These: This option let you exclude certain pages/posts. Provide ID of page/post , separated by comma (,), where you don’t want to have PDF download facility and plugin won’t server those pages/posts.If you don’t know how to find post/page ID, see this http://www.techtrot.com/wordpress-page-id/ [...]

  6. [...] Source: http://www.techtrot.com/wordpress-page-id/ [...]