How to Create a Sitemap in WordPress?

Create a Sitemap in WordPress

In this post, you will learn how to create a sitemap for your WordPress site or blog step by step from the very beginning.

What is a Sitemap?

A sitemap of a website is an XML file that contains links to all pages of the site, and it helps search engines to find, crawl, and index all of the website’s content.

Create a Sitemap in WordPress

If you are using WordPress version 5.5 or above, you do not need to create a sitemap, WordPress will automatically create sitemaps for your site.

You can find the default WordPress sitemap in the /wp-sitemap.xml endpoint.

If you are a Yoast SEO user, you don’t have to create a sitemap for your WordPress blog. Yoast SEO provides this feature for free.

Just go to the Yoast SEO Features tab which is under the General Settings, and enable the XML sitemaps feature, and then click Save Changes.

Yoast SEO General Settings
Features tab of Yoast
enable WordPress yoast sitemap

Create Sitemap using the XML Sitemaps plugin

If you want to create a sitemap like a pro, you can go with the following method.

Follow the below steps to create a site sitemap for your WordPress blog

  1. Disable the Yoast SEO XML sitemaps.

    If you want to create a sitemap through the other plugin and you are already using Yoast SEO, the first thing you need to do is to disable the Yoast XML Sitemap feature, else ignore this step.

  2. Install the XML Sitemaps plugin.

    First, go to the WordPress Dashboard Plugins > Add New section > install and activate the XML Sitemaps plugin.
    XML Sitemaps WordPress Plugin

  3. Go to the XML Sitemap settings.

    You can find the XML Sitemap settings under the Settings menu.
    xml sitemap plugin dashboard menu

  4. Basic Options.

    Uncheck the Use default XSLT stylesheet and Include sitemap in HTML format.
    XML sitemaps Basic Options

  5. Post Priority.

    In the Post Priority option, select the => Do not use automatic priority calculation.
    Sitemap Post Priority option

  6. Change Frequencies Option.

    In the change frequency option, you can do the same setting as on the following image. Basically, this option gives a hint (not a command) to the search engine crawlers about crawling time table.
    WordPress XML sitemap Change Frequencies Option

  7. Priorities option.

    However, Google does not currently consume the priority attribute in sitemaps, but if you wish you can do the same priority setting as on the following image, and I suggest you to optimize the priority setting.
    WordPress XML sitemap Priorities option

  8. Click the Update options to save the changes.

    Update Sitemap Options