
Fixes XML declaration errors in sitemaps and RSS by removing leading whitespace. Just activate, no setup required.
| Author: | Turbo Addons (profile at wordpress.org) |
| WordPress version required: | 5.2 |
| WordPress version tested: | 6.9 |
| Plugin version: | 1.0.3 |
| Added to WordPress repository: | 06-08-2025 |
| Last updated: | 11-12-2025 |
| Rating, %: | 100 |
| Rated by: | 2 |
| Plugin URI: | https://wp-turbo.com/whitespace-fixer-for-xml... |
| Total downloads: | 443 |
| Active installs: | 60+ |
![]() Click to start download |
|
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.
Features
- Automatically removes leading whitespace from XML output
- Fixes “XML declaration not at start” errors
- Works with Rank Math, Yoast, and other sitemap plugins
- Compatible with any WordPress theme or hosting
- Runs silently in the background
License
Whitespace Fixer for XML Sitemap is licensed under the GNU General Public License v2 or later.
Screenshots
FAQ
ChangeLog



