Recently I came across a technical problem in my site powered by WordPress. The problem is that my blog’s http://www.firstsitesolutions.com/rss is not working. It gives this validation error:
XML Parsing Error: xml declaration not at start of external entity Location: http://www.firstsitesolutions.com/rss Line Number 2, Column 1: <?xml version="1.0" encoding="UTF-8"?>
This has happened for no apparent reason I can think of. It just stopped working suddenly one day.
I tried to workaround by deactivating my plugins, but that didn’t work.
When I tried switching themes to default WordPress theme-Twenty Fourteen, the error was gone. Thus, I believed that it had to be something wrong in my customized theme.
After I searched for this problem from Internet, and I found that many people who run a WordPress site have the similar problem.
Finally I found out reason for this problem.
This rss feed error indicates that our rss page includes a blank line in its code before the opening of php marker or after the closing of php marker.
It looks like this:
<! - - blank line - ->; ; <! - - blank line - ->;
There are two ways that you can fix this error.
Do it manually
You can go through all the cited files and delete every blank line in the code on those pages. However, this method is time consuming. Also, if you neglect to delete one blank line, this will yield no change in the rss failure.
Use a plugin
If your site is powered by WordPress, a plugin named Fix My Feed Repair is the one that comes for the rescue. This plugin is simple and powerful. I installed this plugin and my error of rss failure is gone.
To install this plugin:
- Upload the package to the /wp-content/plugins/ directory.
- Active the plugin through the Plugin menu in the dashboard of WordPress.