If you have encountered feed validation errors with Wordpress plugins you may find this useful.
1. The problem
The problem you may know is that an advanced Wordpress installation (say: having many plugins and customized pages installed) can results in an invalid Feed-Validation like this:
This feed does not validate.
line 1, column 1, XML parsing error: 1:1: xml declaration not at start of external entity
^
The Feedvalidator returns a XML Parsing Error marking a whitespace before the first xml-tag. Nobody knows where this comes from…right?
2. The source
…may be in any of your Wordpress Plugin files. The XML-Feed Validation error simply results from leading or trailing whitespaces in any of your wp-plugin’s *.php file.
3. The solution
To fix the validation error switch off your plugins one by another to see in which script the bug is in. (switch off>validate…etc.)
If you spotted the ‘buggy’ plugin-file check it for leading or trailing whitespace before and after the -Tags. Simply delete them with a text-editor of your choice and also make sure that there aren’t any blank lines outside the script tags.
4. Validation
When the work is done you will be rewarded with a valid feed.
![]()
Congratulations!
This is no big deal, but I think this only happens because users create these files from scratch in a text-editor just by pasting selected php-code from a plugin’s webpage or customizing the plugin a bit (assuming the plugin is originally well-formatted).
So take care of your whitespaces. Hope this helps.
Posted in Wordpress, Tags:feed, validation, Wordpress
Possibly Related Entries
4 Responses to “Wordpress plugins causing feed errors”
Who's linking?
Eine Seite
freshlabs journal is the bi-lingual weblog and digital playground of Tim Isenheim, designer and webdeveloper from Hamburg, Germany. More →
Recently Commented On
Recently updated
- 12/18/2009 About
- 11/26/2009 WordPress Plugin: SIMILE Timeline
- 03/05/2009 Awesome Digital Hologram Website Concept
- 11/07/2008 Gorillaz Holographics at EMA
- 11/01/2008 Disappearing Leopard Network Shares





Thanks a lot.I finally settled this problem as you wrote here.And the bug plugin is TechnoTag which has white space after the end
I’ve spent about 3 hours yesterday trying to fix this very issue.
After that I’ve decided to code up a general solution for those leading whitespace problems.
Maybe you’ll find that script helpful:
http://wejn.org/stuff/wejnswpwhitespacefix.php.html