WordPress error on line 2 at column 6

This post is also available in: Slovenian

Suddenly RSS feed stop working on my WordPress blog and showing error on line 2 at column 6. Google Webmasters did not notice error and everything was allright for it, but on different internet browsers we can see this error so it must be feed’s bug for all browsers.

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.



I recently change graphics template on my blog and after than RSS feed stop working. First I try to use WordPress plugin Fix My Feed RSS Repair and of course empty cache, but it did not work for me ( feed cache was disable).

The problem is in empty space in code for template. First look in functions.php, especially last row, if it’s ok, than look in all other php files of template and remove empty lines. For me it was empty last line in single.php.

It’s the same solution if you have error on line 2 at column 6 for sitemap xml.



Works as system engineer in Slovenian Enterprise in Microsoft environment focusing on security, deployments, SharePoint, SCCM and CheckPoint firewall. Author of successful blog about IT security, Microsoft tips & tricks, social media, internet trends.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.