Gmcfuerte XML Sitemap

Description

WordPress has generated a sitemap since version 5.5, and for many sites that is
genuinely enough. This plugin is for the sites where it is not.

Core’s /wp-sitemap.xml lists posts, pages, public custom post types,
categories, tags and author archives, and gives each entry a <loc> and a
. That is the whole of it. Core implements none of the sitemap
extensions, so if you need search engines to see your images, your videos or
your news content as such, core cannot express it.

This plugin serves /sitemap.xml and adds exactly the parts core leaves out:

What this adds that WordPress core does not

  • Image sitemap — <image:image> entries for the images in your content, so
    Google Images has a URL list instead of having to discover them by crawling.
    Core has no image sitemap at all.
  • Video sitemap — <video:video> entries with thumbnail, title, description
    and player URL for embedded and self-hosted video. The post’s featured image
    is the thumbnail, and Google rejects a video entry that has none, so posts
    without a featured image are left out. Core has no video sitemap.
  • Google News sitemap — a <news:news> sitemap of the last 48 hours, up to
    1,000 posts, in the shape Google News expects. Core has no news sitemap.
  • hreflang alternates — <xhtml:link rel="alternate" hreflang="..."> inside
    each URL entry, for sites translated with Polylang or WPML (those two
    are what the plugin reads translations from). Core emits no alternates.
  • <changefreq> and <priority> — core deliberately emits neither. They
    are hints, and the major engines mostly ignore them, but some crawlers and
    internal tools still read them.
  • Served at /sitemap.xml — the conventional path, rather than core’s
    /wp-sitemap.xml.
  • Exclusions from the admin screen — exclude individual post IDs or whole
    post types without writing a filter.

If none of the above matters to your site, core’s sitemap is fine and you do
not need this plugin. That is a genuine recommendation, not modesty.

Privacy and network use

This plugin makes no external network requests whatsoever. It contacts no
API, sends no telemetry, pings no search engine, checks no remote server for
updates, and loads no font, script or image from a third-party domain. It reads
your database and writes XML. Nothing leaves your server.

It also writes no file anywhere outside its own plugin directory, and deletes
no file at all — not on uninstall, not ever. Your site root is left exactly as
it was found.

Working alongside core

Publishing two sitemaps for one site is not useful, so by default this plugin
switches core’s /wp-sitemap.xml off. If you would rather keep both, untick
“Disable the WordPress core sitemap” in the settings.

Installation

  1. Install the plugin through Plugins Add New, or upload the plugin
    folder to /wp-content/plugins/.
  2. Activate it through the Plugins menu.
  3. Go to Settings XML Sitemap and choose what to include.
  4. Submit https://your-site.tld/sitemap.xml in Google Search Console or Bing
    Webmaster Tools.

Your sitemap is linked from robots.txt automatically.

FAQ

WordPress already makes a sitemap. Why would I install this?

For image, video, news or hreflang entries, which core does not produce at all.
If you only need a list of your posts, pages and terms, core already does that
and you should keep using it.

Does it replace the core sitemap?

By default yes — it turns off /wp-sitemap.xml so your site publishes one
sitemap instead of two. You can turn that behaviour off in the settings and run
both.

Does it work with another SEO plugin that also makes a sitemap?

Technically yes, but you should not run two sitemap generators at once. Turn
the other plugin’s sitemap off, or this one.

My sitemap returns a 404.

Go to Settings Permalinks and click Save Changes. That regenerates the
rewrite rules. If your permalinks are set to “Plain”, pretty sitemap URLs are
not available at all — the settings screen shows the query-string URL that
works instead.

Does it send my data anywhere?

No. The plugin makes no external requests of any kind. See “Privacy and network
use” above.

Will it delete my existing sitemap.xml file?

No. This plugin never deletes a file, and never writes one outside its own
directory. If a static sitemap.xml file already exists in your site root, your
web server will serve that file instead of this plugin’s output — delete or
rename it yourself if you want the plugin’s sitemap to take over.

What is the maximum number of URLs per sitemap?

50,000, the limit in the sitemap protocol. The content, image and video
sitemaps split at that point into numbered files (sitemap-content-2.xml and
so on) listed in the index. The category, tag and author sitemaps are single
files and stop at the same 50,000; the news sitemap stops at 1,000, which is
Google’s own limit for it.

Why does the index list fewer sitemaps than I switched on?

Because the index lists only the sitemaps that have something in them. Switch
the video sitemap on with no videos published and no sitemap-videos.xml
appears in the index — an index entry pointing at an empty file is what makes
Search Console report “Sitemap is empty”. Publish a video and it appears by
itself, at the latest when the cache expires.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Gmcfuerte XML Sitemap” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.4

  • Fix a fatal error when saving or deleting a post (including WordPress’s own auto-drafts) and when serving any sitemap.
  • Uninstall now also removes the two cache revision options the plugin stores.

1.0.3

  • Clarify intentional XML, database maintenance and WPML API usage for Plugin Check.
  • Use the full plugin prefix for settings template variables.

1.0.2

  • Document the XML response as already-generated XML for output escaping review.

1.0.1

  • Sanitize conditional request headers and use WordPress.org translation loading.

1.0.0

  • First release.