How to create a sitemap page for WordPress blog

Well it’s a long-time for me to comeback after many busy works at my company :), so, in this post I wanna to show you how to create a sitemap page for your WordPress blog without any additional plugin. If your web blog doesn’t have this page, lets try this simple tip with me.

First, why should your website have a sitemap page?

As a blogger, I think all of you are know about the importance of the sitemap page and therefore: the Google XML Sitemaps plugin for WordPress was downloaded 4,385,535 times (according to figure), of course I don’t want to talk about it again but most of bloggers aren’t create a sitemap page for their visitor and it’s a big missing! An XML sitemaps will help the SE index your website more easily but your website visitors almost never view that page and they need a page to scan all of your blog posts. (In addition, this page will help to increase the inbound linking for your site)

A Sitemap page demo

A demo of sitemap pages you should check out at:

And how to make it?

There’s just a few simple step:
1/ Locate to your WordPress theme folder and make a copy of the page.php file, rename the new one is sitemap.php.
2/ Edit sitemap.php file:
<?php the_content(); ?>
<ul><?php wp_list_pages("title_li=" ); ?></ul>
<li><a title="Full content" href="feed:<?php bloginfo('rss2_url'); ?>">Main RSS</a></li>
<li><a title="Comment Feed" href="feed:<?php bloginfo('comments_rss2_url'); ?>">Comment Feed</a></li>
<ul><?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0&feed=RSS'); ?></ul>
<h3>All Blog Posts:</h3>
<ul><?php $archive_query = new WP_Query('showposts=1000&cat=-8');
while ($archive_query->have_posts()) : $archive_query->the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
(<?php comments_number('0', '1', '%'); ?>)
<?php endwhile; ?>

<?php wp_get_archives(‘type=monthly&show_post_count=true’); ?>
3/ Add the following code on top of sitemap.php file:
Template Name: Sitemap

4/ Login to your WordPress admin panel, create a new page with any Page title as you want.

In the Page Attributes box, choose sitemap template and then publish this page. It’s done!

Jenni R

I'm a Chief Branding Officer of IntenseBlog Website, a knowledge-hub to help you build a profitable blog. For the last 3 years I have dedicated myself to blogging and online marketing solutions. Connect with me on: Google+, Facebook and Twitter.


Leave a Comment
  1. Reply

    Very simple and easy written, thanks for the share i have created the sitemap for my blog now.

    1. I have been using a plugin which does this job. Thanks for the code though :)

  2. Pingback:140+ Highly Useful Articles for Web Designers and Developers — tripwire magazine
  3. Pingback:Roundup: Best Design related articles Septeber 10
  4. Reply

    I agree with you. Not all bloggers uses site map. I’ve seen so many blogs that only use category listing and archive listing for their blogs so that their readers can locate their posts easily. But not as easy as having a site map added into your site.

  5. Reply

    Hmm, I started to follow your directions and created a page first. I wanted to see what templates were in there.. To my amazement, there was a Site Map template in the drop down already. I wonder if that is new for WordPress 3x or if I once installed a plugin then removed it when I could not figure out how to use it? haha. No idea how it got in there.. But selected it and my sitemap was up and running within seconds.

    1. Nice to hear about that :)

    2. No, actually some themes already have sitemap page built in it.
      It depends on the developer, and it doesnt matter whether the theme is a free theme or the premium one.

  6. Reply

    Thank you so much for the simple instructions on how to make a sitemap in wordpress! I had already created my xml sitemap but I wanted to create one for my users to find stuff quickly. I know that when I am on a site that looks like it has a lot of pages I am either going straight to the search bar or the sitemap. :) Thanks again and please keep up the great work!

  7. Reply

    Thank you so much for the great information!

  8. Reply

    thanks…. i make a sitemap for my blog…

  9. Reply

    Although there a lot of plugins that automatically does this job for us, I would definitely still go for this one.

    Nice Tutorial Jennifer :D

  10. Reply

    Sitemap is a very important thing in a blog. Like what other bloggers keep on telling, search engines love it, Google absolutely love those blogs with sitemap. It’s great that you remind it to us.

  11. Reply

    Jennifer, i already had a plugin doing this job, But which one do u prefer? Creating it manually or letting the plugin do the job? Please advice


    1. I think you should do all of them, one for SE, and one for human visitor.

  12. Reply

    I like the looks of this particular WordPress Sitemap. Looks very simple to implement. Thanks for sharing this tutorial.

  13. Reply

    Thanks a lot Jennifer! This really helped me !


  14. Reply

    Hi Jeniffer. Thanks a lot for the tuts. It works like a charm on my site. I just want to know, why the status of my sitemap on Google webmaster is X but there is url been index?? Do you know what’s the problem?

    1. Just waiting for Google index all of your pages :D

  15. Reply

    Thanks Jeniffer for sharing what you know here. I did created my sitemap once and not really into the right place. I will do over with your tutorial…

  16. Reply

    nice tips i must use on my word press blog

  17. Reply

    awesome code … :)
    i thought that the writer is a boy..he3
    but its a beautiful girl..:)

  18. Reply

    thank you for this lesson. I had a problem. I make a site map but my site map dont show my last posts. how I can solve it…

  19. Reply

    The procedure is easy to follow and most important – works. Thank you very much for sharing this useful procedure.

  20. Reply

    I always had used plugins which automatically update itself. You can also set the priority for deep links. I also recommend using a xml sitemap creator for the archives section of your site.

  21. Reply

    nice information and good tutorials .. thanks for the article mate …

  22. Reply

    Nice tutorial. I was just creating a site map page and didn’t even think about adding the feeds in here. Nicely done ;)

  23. Reply

    Thanks… I Have Succesfuly Installed This Trick To My Themes

  24. Reply

    Hi. Thank you for this… so simple. I do have one small issue that I’m hoping you can help me with. When I go to my blog and click on “Sitemap,” the sitemap comes up very nicely just like you have here on your site. However, if I click on a menu (category) on my horizontal menu bar, I get a 404 page. Though I can click on my blog’s home page or any menus with an external link and be taken to the appropriate place. It’s just the menu links for my internal categories that is having the issue. However, if I go to the Home page on my blog and then click the menu links, I am taken to where I should be. The only time I have an issue is within the Sitemap page. Yet again, I can click on the same category links in my sidebar, and I am taken to the appropriate place. I don’t want my readers coming in and getting frustrated if they decide to click on a menu link rather than a link given by the sitemap. I’m sure it’s just a small piece of coding that can fix this. Can you please help me?

    1. Hi Abby, could you tell me how do you show the category list on your menu bar?

  25. Reply

    Hey, thanks for being there for me tonight…I really needed some help on my Sitemap, because I don’t have one. My buddy said I needed one so I Google and got your find answer. However, I don’t know how to use code at all right now, so I’m doing more homework to get that sitemap up on my page.t

  26. Reply

    Been looking all day and then some for EXACTLY what your blog did for me. THANK YOU!!!!!!!

    Now…if you had a High Slide trick or two you could pass along. :)

    Thanks again, Mike

  27. Reply

    Thanks Jennifer. Very well explained. I will make a sitemap for my blog.

  28. Reply

    Thank you thank you thank you! I’ve tested a bunch of XML sitemap generators, fine for the search engines, but found none that worked as well as for site visitors. Thank you. Now visitors can see all blog posts and I don’t need to keep manually editing an html sitemap each time I add new posts (or worse, when i change or edit themes). This keeps track of posts et al for me.


  29. Reply

    Dear Jenni,

    Thanks for your tips. I will make one for my site now. :)

  30. Reply

    Thanks for the tutorial. It was just what I needed

  31. Reply

    I have wordpress installed on a subdirectory of my website, so it’s at www . mysite . com / blog and it works great. I have a sitemap fr my main website which I update manually, but am not sure what to about the sitemap for my wordpress blog because of how it’s set up. Do I just add the blog posts to my main sitemap like my other website pages, or shold install a sitemap plug in? I’m confusd as to what would be a better move SEO-wise…

    1. Hi Dan, as what you say, I assume that your main website is not powered by WordPress. I think it’s necessary that there’s only 1 sitemap page for a website therefore, you need to add the blog posts to my main sitemap.

  32. Reply

    Hey Jenni, thanks for this tutorial.

    You could also add a list of authors to this template, would be useful if it’s a multi author blog.

  33. Reply


    It’s quite useful code. Now, can you pls explain to add ‘sub-categories’ under ‘main-categories’ and to add ‘author’ list in sitemap.


  34. Reply

    Thank you very much for the simple and very helpful information! No plug-in needed :) hurray!

  35. Reply

    hi Jenni,
    I use your code on my site it was working fine but now i am getting error message-
    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 64 bytes) in /home2/fabricd3/public_html/designersbrush/wp-includes/meta.php on line 339

    Any idea what is wrong with it, thanks for your help.

    1. As this error I think this’s a problem with your host so you can contact them about it, maybe it allows too few memory for your site.

  36. Reply

    Thanks a lot, very good link.

  37. Reply

    I used that plugin. Google XML Sitemaps. it is useful. thanks.

  38. Reply

    Thanks a lot – this helped!

  39. Reply

    Very nice and useful info.. I got site map huppp!!!!

  40. Reply

    Hi! This is a Nice Tutorial. I make it simple to understand. I will apply with my own blog this one.

  41. Reply

    Thanks Jenni, it’s really helpful post but why do we need to create a separate XML Sitemap Page? I know you gave the answer above but what I am asking is you can submit your sitemap without creating a page right? So why it’s necessary to create new page just for sitemap?

  42. Reply

    Great post but I still think plugins are the easy way nowdays to make sitemaps and other stuff.

  43. Reply

    Thanks you for sharing information, I find it helpful by this article to create a sitemap in WordPress an easier without must using a plugin that overload the server’s performance.

  44. Reply

    Really nice tips and alot of thanks for that JENNIR!

  45. Reply

    i really like your idea of putting categories, blog posts, archives, pages and number of post per category in a single page but how can i show only categories on a page for ex. lets say i have a celebrity blog now i want a page which have Celebrities as heading than alphabet “A” and under this all the celebrities staring with the alphabet “a” and so on.

    1. Currently, I don’t have any idea for this one.

  46. Reply

    thanks for sharing this! quite useful. :D

  47. Reply

    i cant found in my site.php

  48. Reply

    Hey, thank you for this nice sitemap. I use multisite on my wordpress and this helps me a lot. But my site have posts about 2000 so it will not cause any problem right? like taking too much time for loading sitemap???

  49. Reply

    Google Sitemap Generator Plugin makes my WordPress Sitemap as so simple :P

  50. Reply

    Thanks for the easy to follow instructions. Others I have read online were not as easy to follow.

  51. Reply

    Nice informative blog, thanks for sharing.

  52. Reply

    very nice tips for me
    thanks to share with us ;)

  53. Reply

    Thanks Jenny. I’ve been looking for this simple sitemap code. Now my theme officially has a sitemap page :)

  54. Reply

    Thanks for sharing.You make some very informative points. Keep up the great work!

  55. Reply

    A good sitemap helps your visitors find faster and easier what they’re searching for and, at the same time, allows the search engines to crawl your website faster. As for the HTML map, take care to check it before uploading it. The generator creates the map following the crawling instructions you give the search spiders in your robot.txt file. “Rebuild sitemap if you change the content of your blog” is checked so that it updates automatically.

  56. Reply

    what is its difference with the existing plugin ?

  57. Reply

    Hi .. first of all , I want to give thanks for this useful post . A sitemap is the thing that works behind the webpages to get indexed in search engines .Previously , I used to use Google XML Sitemap Generator Plugins for WordPress .but after some time I got problem from it .However , it stopped responding for me and don’t know why it did so . after that , I tried to create sitemap manually . But it was not only boring but also laborious job for me . So I tried to submit my RSS feed as my sitemap in web masters tool in Google. But there is a problem with the old blog pages because they are not properly indexed . However , I tried a xml sitemap generator for my site ..even I wrote an article about it .. here is the link .. any one can check it too .. “ ” …Thnx again ..:)

  58. Reply

    Thanks!! very useful and nice triks.. :D

  59. Reply

    Thank you so much and this helped to develop my site map.

  60. Reply

    Simple but intructive…How i wish i could migrate soon from blogger to wordpress..thanks for the info…honestly, i’ll keep on exploring about wordpress for quite sometime now…

  61. Reply

    I made a site map for my blog using this method, But once I tried to submit it to Google webmaster tools it says, the site map is in HTML form and not supported by Google. Is there any solution for this??

    1. This type of sitemap is not for Google Webmaster submitting, it’s only for your “real” visitors.

  62. Reply

    Firstly, I wanna thank you for this helpful post you’ve made. I’m currently searching on how to create a sitemap for my site then I stumbled upon in your blog, this is a great yet simple but effective. Thank you for this. :)

  63. Reply

    Thank you so much and this help me to develop my site map successfully to my website.

  64. Reply

    We have been using Dagon Design Sitemap Generator for years… Definitely like your organization better. Great write up! Will be implementing soon.

  65. Reply

    Thanks for the help really looking for something about sitemap and importance of it too

  66. Reply

    It is a good post, thanks for sharing valuable pieces of advice here. I am using Google sitemap generator right now and it is working pretty well, can you tell me how to make a text sitemap and if it’s necessary to make it for your blog. Will appreciate it, thanks

  67. Reply

    A helpful post, I will try this because I want to lessen my plugin. I will implement this on my site.

  68. Reply

    Nice and informative article

    Although there are many plugins which can be used to generate sitemap, this type of creating sitemap using coding is also a nice way.

    Thank you for sharing such a article .

  69. Reply

    How about using SEO by Yoast plugin which will create the sitemap automatically?

Leave a Comment

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Send a Message