WordPress 5.5 Sitemap Bug Causes 404 Errors

A WordPress 5.5 sitemap bug was reported that impacts some websites with native WordPress sitemaps. The bug creates non-existent XML sitemap pages. The challenge has been formally confirmed.

Sitemap Pagination Bug

Screenshot of WordPress 5.5 bug report

The WordPress bug impacts web sites sitemaps which might be generated by the WordPress core. The bug impacts web sites which have so many pages that they want a couple of XML website map.

According to the bug report, the sitemaps can appear like this instance:


But while you click on on the post-2.xml or post-Three.xml hyperlink to view these sitemaps, the sitemap doesn’t exist and the server generates a 404 web page not discovered response.

The bug report notes the next sudden habits:

“When I go to these URLs, they’re:
wp-sitemap-posts-post-2.xml/web page/2
wp-sitemap-posts-post-Three.xml/web page/Three”

In the above instance, clicking the “…post-2.xml” WordPress redirects the request for that URl to the non-existent URL, “…post-2.xml/web page/2

The particular person reporting the bug additionally added:

“The first URL works accurately, however the final two are 404s.

This occurs with no plugins activated and utilizing the twentytwenty theme.

My setup does have “Day and identify” permalinks enabled. I’m utilizing PHP 7.Three.19 and Nginx 1.19.zero in an area growth atmosphere.”

Why Did the WordPress Sitemap Bug Happen?

As a part of the event cycle, WordPress provides early launch variations that the WordPress group downloads and checks.

It’s throughout this course of that unanticipated bugs are found, famous, and assigned a severity degree and a date for a patch to repair the difficulty.

Software bugs can occur when an unanticipated occasion, like a selected type of permalink construction, occurs which then triggers the sudden habits.

The WordPress growth crew documented this patch that introduces a brand new WordPress perform:

“Introduces the get_sitemap_url() function which is sort of equivalent to get_permalink() but for sitemaps. That new function is used in redirect_canonical().”


Continue Reading Below

The official abstract of the repair says:

“Sitemaps: Prevent incorrect redirection of paged sitemap requests.
Update redirect_canonical() to account for customized pagination and URL format utilized by sitemaps in an effort to observe normal practices.
Introduce the perform get_sitemap_url() to simplify getting the index and supplier URLs as wanted.”

A WordPress perform is a bit of code that creates a selected performance. There are features which might be particular to themes, plugins and to the WordPress core.

The WordPress sitemap is a brand new addition to the WordPress core. So it was virtually inevitable for one thing to haven’t been anticipated.

When Will WP Sitemap Pagination Bug Be Fixed?

The repair has been accomplished.

The patch is scheduled to be launched within the WordPress 5.5.1 launch candidate 1, scheduled for August 27th.

The ultimate WordPress 5.5.1 upkeep replace is scheduled for Tuesday September 1, 2020.


Sitemap Bug Ticket:
5.5 Sitemap URLs Are Incorrectly Paginated

Documentation of Code That’s Being Fixed

WordPress 5.5.1 Maintenance Release Schedule

Source hyperlink search engine optimisation

Be the first to comment

Leave a Reply

Your email address will not be published.