xml parsing error xml or text declaration not at start of entity in wordpress feed xml parsing error xml or text declaration not at start of entity in wordpress feed wordpress wordpress

xml parsing error xml or text declaration not at start of entity in wordpress feed


Try installing fix-rss-feed plugin.

Also I think you have a space before <?xml version="1.0" encoding="UTF-8"?>. Getting rid of it should do the trick.


fix-rss-feed plugin is outdated. I had the same problem with the RSS feeds, try the solution provided here http://wejn.org/stuff/wejnswpwhitespacefix.php.html it works like charm!


In my opinion, rather than using a plugin, a better solution would be to remove all trailing white space across all PHP files in your theme directory. In a terminal window run:

cd yoursite/wp-content/themes/yourtheme

then run

find ./ -name "*.php" -exec sed -i -e '/^\n*$/d' {} \;

After that runs, try navigating to yoursite.com/feed