My blog feed show error today:
This page contains the following errors:
error on line 2 at column 6: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error
My blog feed: http://feeds.feedburner.com/klassicblog
My blog: http://blog.klassicweb.com
Your xml document starts with a new-line.
One of the files included in either your theme, or a plugin, has an empty blank line before the starting
First, deactivate all plugins, and try to load your sitemap.xml link. If it works now, then one of your plugins is the culprit. If it still does not work, then move on...
Second, go through each and every one of the .php files that make up your WordPress theme. Find any starting
Third, reinstall WordPress core installation. If it still doesn't work, then contact a developer to do some deep diving into your source code.
Every page on your page (included sitemaps) contains empty line at the begin. (You can see HTML source) You should remove this line to fix sitemaps. You can try following steps:
Check your wp-config.php file for blank lines outside of bracketed sections.
Check your theme’s functions.php file for blank lines outside of bracketed sections.
One by one, disable plugins and revalidate until you isolate the one causing the problem ( How To Check For Plugin Conflicts )
Note that the final php ?> should be omitted from all PHP code files - modules, includes, etc. (eg. wp-config.php, functions.php, ...).
There must be more than 1 blank line at the very end of the functions.php file if you are using wordpress.
Just remove these blank lines and the error would go off.
If you want to know more about the error, read this article: http://www.am22tech.com/fix-xml-declaration-rss-feed-error/
Here is the solution I found First you create a php file (whitespacefix.php) on the wordpress root dictory with following content.
Then open the index.php file and add the following line right after
<?php
tagReferenced from here