Best XML sitemap generator for WordPress

An XML document called Sitemap is one of the most important files of a website. It has Extensible Markup Language tags.

The document may have hundreds of thousands of nodes, and each node has one or more than one element. In the case of the sitemap, you’ll find these elements in nodes – loc, changefreq, lastmod, and priority. The loc element contains nothing but the URL on your website. The changefreq element helps search robots find pages on a website that are updated frequently or rarely. As the name suggests, lastmod is the time at which the page was last modified. Priority is the rank of the pages. The pages with higher priority might be processed first by search bots.

What are the advantages of sitemap files?

Helps in indexing: Search robots can crawl the entire site only if each website page is reachable. A user may not interlink pages, or a site may have poor structure. If the website has this file, every URL on the website will be reachable by Google, Bing, Yandex, and other search engines.

Makes search engines aware of changes on the site: This file may have the last modified date in the nodes. Thus, search engines can quickly find out which page on the site has been changed recently.

WordPress stores everything in the DB. In the case of posts, the WP Posts table contains all post details. To create a sitemap for your WP site, you have three options –

  • Build a PHP-based crawler that will crawl the pages of your site and create a sitemap.
  • Fetch the list of permalinks from the WP posts table and create an Extensible Markup Language file.
  • Use a WordPress plugin.

The first two methods are not easy, but the last one is easier. Here is the list of the top WordPress XML sitemap generator for WordPress:

Google XML Sitemap

XML Sitemap Generator

If you’re looking for a plugin that will let you customize the sitemap, install GXS. By default, the name of the XML document containing the list of post/page URLs, their publishing date, etc is “sitemap”. Thus, anyone can visit the file and see the number of pages/posts published on your site and their URLs. This plugin enables you to change the name of this file to something else. It can also use an XSLT stylesheet file of your choice to stylize the XML document.

If your site is big and has thousands of posts, a SQL query run by GXS may take some time to execute. If the query doesn’t return results quickly, the document may not be generated. GXS allows you to increase the query execution time limit.

The plugin can also notify search bots, such as Google, about recent changes on your website. It can generate post priority by the number of comments posted by the visitors on a page and the average comments count and add the same to the file. It can also add the last modified time to the XML file.

Simple XML Sitemap Generator

Simple XML Sitemap Generator

SXSG doesn’t have dozens of options like the above plugin but is very easy to configure as you have just 3 to 4 options to play with. You can configure SXSG to create a sitemap with posts or pages. This plugin also enables you to set a custom priority score for posts and pages in the document with the help of custom fields. You can also make SXSG exclude certain posts and pages from the file. SXSG works great with WooCommerce. Thus, you can use it on your WooCommerce-powered WP eCommerce website.

Sitemap by BestWebSoft

BestWebSoft Sitemap plugin

A good alternative to SXGS and XSG, this plugin features four tabs on the settings page. The label of the tabs are Settings, Structure, Misc, and License Key. The Settings tab lets you add the link to the website’s Extensible Markup Language document to the robots.txt file. It also enables you to generate a separate sitemap for media files and set the number of URLs you want to see in the file.

On the Structure page, you can specify the post type and taxonomy the plugin should consider to generate the sitemap. The remaining two tabs i.e. Misc, and License Key, don’t have any useful options. Thus, you can ignore them. The BestWebSoft plugin has some Pro features, which the first plugin on our list offers for free.

Companion Sitemap Generator

BestWebSoft Sitemap plugin

The CSG plugin can apply custom styling to the XML document and add one of these change frequency to the document – always, hourly, daily, weekly, monthly, or yearly. CSG can hide the change frequency as well. It can update the Extensible Markup Language file’s data hourly, daily, or twice daily.

Like some plugins we’ve covered above, CSG can notify Bing and Google each time the XML document has been generated or updated by the plugin. CSG lets you add a URL manually in the sitemap. It also ships with content filter settings i.e. you can configure CSG to exclude certain pages/posts or posts/pages belonging to certain categories in the file.

XML Sitemap and Google News

XML Sitemap and Google News

XSGN is another widely used WordPress sitemap generator plugin. It can create multiple sitemap files by splitting the posts by the publishing year, month, and week. It lets users set the same priority for URLs in the XML document and can also calculate and assign priority to the links automatically.

XSGN can change the post/page update date in the Extensible Markup Language document each time a user posts a comment on the site. As in the above plugin, you can add a URL manually to the XML file. If a sitemap is already present in the WordPress installation directory, XSGN will make you aware of it.


Pramod is the founder of wptls. He has been using WordPress for more than nine years. He builds web applications, and writes about his experiences with various WP products on this site.

Leave a Reply

Your email address will not be published. Required fields are marked *