Title: Whitespace Fixer for XML Sitemap
Author: Turbo Addons
Published: <strong>6 Agosto, 2025</strong>
Last modified: 20 Setembro, 2026

---

Procurar plugins

![](https://ps.w.org/whitespace-fixer-for-xml-sitemap/assets/banner-772x250.png?
rev=3340162)

![](https://ps.w.org/whitespace-fixer-for-xml-sitemap/assets/icon-256x256.png?rev
=3340090)

# Whitespace Fixer for XML Sitemap

 Por [Turbo Addons](https://profiles.wordpress.org/turboaddons/)

[Descarregar](https://downloads.wordpress.org/plugin/whitespace-fixer-for-xml-sitemap.1.1.1.zip)

 * [Detalhes](https://pt.wordpress.org/plugins/whitespace-fixer-for-xml-sitemap/#description)
 * [Avaliações](https://pt.wordpress.org/plugins/whitespace-fixer-for-xml-sitemap/#reviews)
 *  [Instalação](https://pt.wordpress.org/plugins/whitespace-fixer-for-xml-sitemap/#installation)
 * [Desenvolvimento](https://pt.wordpress.org/plugins/whitespace-fixer-for-xml-sitemap/#developers)

 [Suporte](https://wordpress.org/support/plugin/whitespace-fixer-for-xml-sitemap/)

## Descrição

**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

 * [Live Demo](https://wp-turbo.com/whitespace-fixer-for-xml-sitemap/)

**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](https://www.gnu.org/licenses/gpl-2.0.html).

## Ecrãs

[⌊Browser error message without the plugin (before fix)⌉⌊Browser error message without
the plugin (before fix)⌉[

Browser error message without the plugin (before fix)

[⌊Browser error message without the plugin (before fix)⌉⌊Browser error message without
the plugin (before fix)⌉[

Browser error message without the plugin (before fix)

[⌊XML sitemap loads cleanly after plugin activation (no errors)⌉⌊XML sitemap loads
cleanly after plugin activation (no errors)⌉[

XML sitemap loads cleanly after plugin activation (no errors)

## Instalação

 1. Upload the plugin to the `/wp-content/plugins/` directory, or install it via the
    WordPress Plugin Installer.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. That’s it! Your sitemaps and feeds will now be clean and error-free.

## Perguntas frequentes

### 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.

### Will this conflict with my SEO plugin?

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

### What if I still see the error after activation?

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

### Does it have any settings page?

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

## Avaliações

![](https://secure.gravatar.com/avatar/9cfea86a094c55394c529887b8d62212bdedb42b58743a5c3dd87e5aaa721db0?
s=60&d=retro&r=g)

### 󠀁[Works perfect](https://wordpress.org/support/topic/works-perfect-1146/)󠁿

 [bestwin](https://profiles.wordpress.org/bestwin/) 21 Dezembro, 2025

Thanks this saved me so much time, even AI could not solve my problem, but one click
and it worked 🙂

![](https://secure.gravatar.com/avatar/70b21df941f28a3e1891fce61c2970f20b6c47a286002501b7b37590ca4c757c?
s=60&d=retro&r=g)

### 󠀁[Instantly Fixed My Sitemap Issue](https://wordpress.org/support/topic/instantly-fixed-my-sitemap-issue/)󠁿

 [Webhook Academy](https://profiles.wordpress.org/webhookacademy/) 22 Outubro, 2025

My sitemap had a strange whitespace problem that was breaking indexation. I installed
this plugin, and it fixed everything instantly! Super simple and works like a charm—
highly recommended for anyone facing sitemap issues.

![](https://secure.gravatar.com/avatar/4c0bb7355e95cd3bd30fa8e194695fef819e0800d056281b036d2f70f99c2c31?
s=60&d=retro&r=g)

### 󠀁[works like a charm](https://wordpress.org/support/topic/works-like-a-charm-2422/)󠁿

 [Junior Rocha](https://profiles.wordpress.org/jr1917/) 23 Setembro, 2025

Just install and activate to work. Amazing!

 [ Ler todas as 3 avaliações ](https://wordpress.org/support/plugin/whitespace-fixer-for-xml-sitemap/reviews/)

## Contribuidores e programadores

“Whitespace Fixer for XML Sitemap” é software de código aberto. As seguintes pessoas
contribuíram para este plugin:

Contribuidores

 *   [ Turbo Addons ](https://profiles.wordpress.org/turboaddons/)
 *   [ Md. Abu Bakkar Siddik ](https://profiles.wordpress.org/wpanik/)
 *   [ Md Shariful Islam ](https://profiles.wordpress.org/sharifok/)
 *   [ Md Rashedul islam Siraji ](https://profiles.wordpress.org/siraji2017/)

[Traduza o “Whitespace Fixer for XML Sitemap” para o seu idioma.](https://translate.wordpress.org/projects/wp-plugins/whitespace-fixer-for-xml-sitemap)

### Interessado no desenvolvimento?

[Consulte o código](https://plugins.trac.wordpress.org/browser/whitespace-fixer-for-xml-sitemap/),
consulte o [repositório SVN](https://plugins.svn.wordpress.org/whitespace-fixer-for-xml-sitemap/),
ou subscreva o [registo de alterações](https://plugins.trac.wordpress.org/log/whitespace-fixer-for-xml-sitemap/)
por [RSS](https://plugins.trac.wordpress.org/log/whitespace-fixer-for-xml-sitemap/?limit=100&mode=stop_on_copy&format=rss).

## Registo de alterações

#### 1.1.1

 * Fixed leading whitespace removal to target only the start of the document instead
   of every line.
 * Improved content-type detection so only XML, HTML, and feed responses are processed.
 * Fixed the plugin text domain to match the plugin slug for better translation 
   support.
 * Limited output buffering to sitemap and feed requests for improved performance.
 * Enabled SSL verification for analytics requests and removed leftover debug logging.
 * Cached the support popup check to reduce admin page load overhead.

#### 1.1.0

 * Added a new status page under Tools  XML Whitespace Fixer.
 * Display plugin, WordPress, and PHP version information.
 * Display XML sitemap URL for quick access.

#### 1.0.5

 * Added more security and optimized the plugin structure.

#### 1.0.4

 * Improved performance and update security.

#### 1.0.3

 * Tested up to WordPress 6.9 to ensure full compatibility.
 * Updated internal hooks for better stability with the latest WordPress core changes.

#### 1.0.2

 * Improved performance by reducing unnecessary output buffering.
 * Refactored core cleanup logic for cleaner and more reliable XML output.

#### 1.0.1

 * Improved output sanitization to enhance overall security and prevent unwanted
   data leakage.
 * Added stricter header validation before applying whitespace cleanup for safer
   XML response handling.
 * Optimized output buffer handling to ensure better compatibility with caching 
   and SEO plugins.
 * Improved performance and reduced risk of accidental whitespace removal in non-
   XML outputs.

#### 1.0.0

 * Initial release
 * Automatically removes whitespace before XML declarations

## Metadados

 *  Versão **1.1.1**
 *  Última actualização **Há 2 meses**
 *  Instalações activas **300+**
 *  Versão do WordPress ** 5.2 ou superior **
 *  Testado até **7.1.4**
 *  Versão do PHP ** 7.2 ou superior **
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/whitespace-fixer-for-xml-sitemap/)
 * Etiquetas
 * [error](https://pt.wordpress.org/plugins/tags/error/)[rss feed error](https://pt.wordpress.org/plugins/tags/rss-feed-error/)
   [sitemap](https://pt.wordpress.org/plugins/tags/sitemap/)[whitespace](https://pt.wordpress.org/plugins/tags/whitespace/)
   [xml](https://pt.wordpress.org/plugins/tags/xml/)
 *  [Visualização avançada](https://pt.wordpress.org/plugins/whitespace-fixer-for-xml-sitemap/advanced/)

## Classificações

 5 out of 5 stars.

 *  [  3 5-star reviews     ](https://wordpress.org/support/plugin/whitespace-fixer-for-xml-sitemap/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/whitespace-fixer-for-xml-sitemap/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/whitespace-fixer-for-xml-sitemap/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/whitespace-fixer-for-xml-sitemap/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/whitespace-fixer-for-xml-sitemap/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/whitespace-fixer-for-xml-sitemap/reviews/#new-post)

[Ver todas as revisões](https://wordpress.org/support/plugin/whitespace-fixer-for-xml-sitemap/reviews/)

## Contribuidores

 *   [ Turbo Addons ](https://profiles.wordpress.org/turboaddons/)
 *   [ Md. Abu Bakkar Siddik ](https://profiles.wordpress.org/wpanik/)
 *   [ Md Shariful Islam ](https://profiles.wordpress.org/sharifok/)
 *   [ Md Rashedul islam Siraji ](https://profiles.wordpress.org/siraji2017/)

## Suporte

Tem algo a dizer? Precisa de ajuda?

 [Ver fórum de suporte](https://wordpress.org/support/plugin/whitespace-fixer-for-xml-sitemap/)