This question has already been asked before, however, I cannot reply to those comments because I am a new user. Therefore, I will post my question here.

I am trying to create a XML sitemap for my wordpress site. Someone on this site suggested that a duplicate of the XML export file be made. This file is located here.

How can I modify this file in my theme so that it is updated automatically? Where will the exported file be located?

  • 1
    Have you considered using a plugin? Commented May 17, 2014 at 14:57
  • Fir of all, thank you for your quick reply. I have actually. However, I have 2 custom post types on my website;books, lessons. I am hoping to garner a little more control over how google would index my site.
    – user51781
    Commented May 17, 2014 at 14:59
  • Please see the license in the footer (cc by-sa 3.0 with attribution required), edit your question and link to the original question.
    – kaiser
    Commented May 17, 2014 at 15:02
  • You seem to have skipped some research steps there. How does "export file" (?) has anything to do with sitemap?
    – Rarst
    Commented May 17, 2014 at 17:29

3 Answers 3


Latest versions of wordpress (since 5.2 IIRC) have the sitemap generation as part of the core functionallity. Plugins or code are not needed unless you need to customize its generation


The easiest way to achieve what you're looking to do with multiple sitemaps is with Yoast's Wordpress SEO plugin, which will generate a different sitemap for each of your custom post types, in addition to your blog posts and pages.


Use a plugin like Google sitemap plugin, see: google sitemap plugin

  • Please see How to Answer. Link only answers are discouraged and will be almost certainly downvoted. If you need to post more or less bare links, use a comment. You have rep enough for that.
    – s_ha_dum
    Commented May 17, 2014 at 18:57
  • It's the right answer tough? I will write it in a comment next time, but hope to get a vote then! Commented May 17, 2014 at 18:59
  • It is an answer, and we care about answer quality here not just whether an answer technically fits. I would delete this and add it as a comment to question, or I can say with fair confidence that you will get votes just not the ones you want.
    – s_ha_dum
    Commented May 17, 2014 at 19:02
  • Don't forget the fun tough. Then next time I will provide some more context. Commented May 17, 2014 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.