Resolve the error on sending XMLSitemaps with Plugin

I installed the Word Press Plugin into this blog to generate the XML Sitemaps, but the error was occurred. The message said that it is invalid format. I try to resolve this problem and I found the way to resolve.

Update: The cause was a Word Press Plugin Compatibility, see the post below. I found later.

This blog is written in two languages, Japanese and English. I am using Language Switcher which generates the hreflang a[…]

What is a XML Sitemap ?

The XML Sitemap contains the list of pages in a web site to notify updates to the search engines such as Google and Bing.

It contains page meta datas such as bellow.

  • Web page URL
  • Modified Date
  • URL to sub sitemaps

The Word Press version 5.5 introduced built-in generator, but its functionality is not rich, so I installed the generator plugin.


There are some plugins can generate the XML Sitemap. For example:

  • Yoast SEO
  • All In One SEO Pack
  • Google XML Sitemaps

I choose the “Google XML Sitemaps”, because it is a simple and specialized to the generator.

Invalidate the built-in generator

The generator plugin to work properly, you need invalidate the built-in generator. To invalidate it, insert the following line into the “Functions.php” file.

add_filter( 'wp_sitemaps_enabled', '__return_false' );


  1. Open the Word Press Dashboard.
  2. Select the XML-Sitemaps from the Settings.
  3. Click the “your main sitemap and all sub-sitemaps” link.


Author Profile

Akira HayashiA professional developer specializing in macOS Apps, iOS Apps, SDKs and middleware development.
Representative of RK Kaihatsu. I am a professional developer specializing in macOS Apps, iOS Apps, SDKs and middleware development. I often use ObjC, Swift and C++. Based on development experience, I provide e-learning contents, technical books and technical guidance. I am also a technical seminar instructor, in-house training instructor, and administrative / local goverment staff training instructor.
Get the Latest News !
>Programming Tips From Software Engineer

Programming Tips From Software Engineer

Technical News, Documents and Tips.