How to create a sitemap page for WordPress blog

Thesis themes

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!

About 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.


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

  2. Thanks for share…:)

  3. Congratulations on a great blog. Now bookmarked, following on Twitter too!

  4. 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. 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.

  6. 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. Thank you so much for the great information!

  8. thanks…. i make a sitemap for my blog…

  9. 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. 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. 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


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

  13. Ivan Kolevski says:

    Thanks for sharing this. Quite useful.

  14. Abhishek Dwivedi says:

    Thanks a lot Jennifer! This really helped me !


  15. Nice, handy reference. Saved me some time. Much appreciated!

  16. 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?

  17. Thanks for the amazing tutorial. It is so easy to create a sitemap.

  18. Julius-Money Maker Sites says:

    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…

  19. nice tips i must use on my word press blog

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

  21. abdulrahman nahas says:

    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…

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

  23. 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.

  24. Wow,,, good. Its helpful for me..

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

  26. AJ Clarke says:

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

  27. Nurul Imam says:

    Thanks… I Have Succesfuly Installed This Trick To My Themes

  28. 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?

  29. RKellyLee says:

    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

  30. Michael says:

    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

  31. Janis Ian says:

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

  32. 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.


  33. Dear Jenni,

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

  34. Thanks for the tutorial. It was just what I needed

  35. 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…

    • 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.

  36. 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.

  37. Ashish Verma says:


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


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

  39. 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.

    • 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.

  40. Thanks a lot, very good link.

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

  42. Thanks a lot – this helped!

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

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

  45. Pencil Drawing says:

    thank you for share

  46. 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?

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

  48. 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.

  49. Really nice tips and alot of thanks for that JENNIR!

  50. 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.

  51. thanks for sharing this! quite useful. :D

  52. i cant found in my site.php

  53. 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???

  54. Good article, thanks for sharing

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

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

  57. Nice informative blog, thanks for sharing.

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

  59. Leo Ari Wibowo says:

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

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

  61. 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.

  62. what is its difference with the existing plugin ?

  63. 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 ..:)

  64. pramesan says:

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

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

  66. 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…

  67. 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??

  68. Lisa McRain says:

    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. :)

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

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

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

  72. 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

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

  74. 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 .

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


  1. […] web designers that will help you to master HTML 5 rich features through easy to follow guidelines.How to create a sitemap page for WordPress blogIn this post Jennifer R is going to show you how to create a sitemap page for your WordPress blog […]

Speak Your Mind