Fixes XML declaration errors in sitemaps and RSS by removing leading whitespace. Just activate, no setup required.
As of April 2026, Whitespace Fixer for XML Sitemap is a WordPress xml plugin with 100 active installations and a 5/5 rating from 3 reviews. It has been downloaded 1.1K+ times in total. Requires WordPress 5.2+ and PHP 7.2+. Available on WordPress.org since 2025. Actively maintained — updated within the last month. Top alternative: XML Sitemap & Google News.
Whitespace Fixer for XML Sitemap is a lightweight plugin that automatically removes unwanted spaces or blank lines before the XML declaration (<?xml version="1.0" ... ?>) in your WordPress output.
This small whitespace, often caused by themes or plugins, breaks XML feeds and causes browser or validator errors like:
XML declaration allowed only at the start of the document
With this plugin activated, the output buffer is cleaned before anything is sent to the browser—ensuring your sitemaps and RSS feeds are valid and readable by search engines like Google.
✅ Works with:
– Rank Math
– Yoast SEO
– Other Seo Tools
– All themes and plugins
No settings page. No configuration. Just activate and forget.
| WordPress | 5.2+ requiredTested up to 6.9.4 |
| PHP | 7.2+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.