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.

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.

스크린샷

설치

  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.

FAQ

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.

후기

2025년 12월 21일
Thanks this saved me so much time, even AI could not solve my problem, but one click and it worked 🙂
2025년 10월 22일
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.
모든 3 평가 읽기

기여자 & 개발자

“Whitespace Fixer for XML Sitemap”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “Whitespace Fixer for XML Sitemap”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

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