Whitespace Fixer for XML Sitemap

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.

Download
0 +
Widgets
0 +
Templates
0 +

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:
Whitespace Fixer for XML Sitemap

No settings page. No configuration. Just activate and forget.

Features

(FAQ)

Frequently Asked Questions

Does this plugin modify any content or database?

No. It only buffers and cleans output whitespace before it reaches the browser. It doesn’t store or alter data.

Not at all. It is compatible with Rank Math, Yoast SEO, All in One SEO, SEOPress, and others.

Ensure no theme or plugin is sending output (like echovar_dump(), or spaces) before the plugin loads. Also, clear any caching and test again.

No. It’s designed to be automatic. Activate and you’re done.