WordPress 5.5 sitemap bug, which causes 404 error of sitemap is discovered. This bug of WordPress 5.5 sitemap affects some of the website’s with the native WordPress sitemap.
This bug creates non-existent sitemap pages of XML. The WordPress officially confirms this issue. Sitemap of the website, which is generated by WordPress core, has affected this sitemap bug. Usually it affects on that web site which has many pages and thus they need more than one XML sitemap.
According to the report sitemap is look like this;
These are the sitemaps generated by the WordPress, but when you click on the post-2.xml or post-3.xml then these sitemaps are not even existed! So server automatically generates 404 error which means page not found error.
Another pagination error is;
In the above example, when you visit URLs, when you click post-2.xml, then WordPress will redirect this request to the non-exist URL which is post-2.xml/page/2
A person who has reported this bug, even says that only first URL is correctly working and others are showing 404 error. It can also happen when you have used twentytwenty theme, and no plugin with that have used.
Why WordPress 5.5 sitemap error occurred?
WordPress offer early release version that is mainly tested by the WordPress community. As a part of this cycle, Team discovers the error and note it down. Then they assign a severity level and also one date to assign the fix any issue.
This unexpected behaviour or bug comes when any events such as permalink structure and cause the error. Development community has documented this and introduce a new function, which says,
Introducing the get_sitemap_url() function which is equal to get_permalink(). In redirect_canonical() we can use new function..
Official statement of this issue as a Fixed issue;
Sitemaps that Prevent the incorrect redirection of paged sitemap requests.
Update redirect_canonical() to account for custom pagination and URL format which is used by sitemaps to follow the standard practices.
Introducing the function get_sitemap_url() to simplify provider URLs and getting the index as needed.
Apart from this, the final maintenance update of the WordPress 5.5 is soon coming on 1st September 2020. So let’s wait for the new updates!