How To Fix Your RSS Feed Error – “Syntax error: line 1, column 0”

fix-rss-error-syntax-error-line-1While I don’t normally blog about stuff like this;  I was kinda stumped when I had the issue and once I figured it out I thought to write a quick article for other facing this problem. You’re wondering how to fix your RSS feed because you’re seeing the error “syntax error: line 1, column 0”.  What the heck is that?  I’m right there with you because I had this problem too.  The error message can be irritating to troubleshoot but there are several things you can try to resolve it and get back on track. First, understand there are a couple of syntax issues that cause this.  The first may be a blank space in either the closing PHP tag in a plugin or in your WordPress functions file.  So review your functions.php file and confirm that there is no extra space(s) or line breaks after it.  Just as an FYI a closing PHP tag at the end of the file isn’t really required anyway.

If in fact you do have an extra space in a PHP file that shouldn’t be there and can’t locate them you can upload a plugin that may help. Google “Fix RSS Feed” and download the plugin. It’s been around awhile and I’m not sure how much longer it will be available as it appears not to be maintained but as long as it is available you can download and try it.

If it were only that easy you’d be done.  However, if you can’t find extra space in your functions file or running the plugin doesn’t work, then here are a couple of other things to try that worked for me.

Before going further you should try using these two validation sites that can help you better understand what broke in your RSS feed.

RSS Feed Validation and Syntax Help

  1. NU HTML Checker
  2. WWW Feed Validation Service

The first will at least give you a better error message to work with then the useless “syntax error: line 1, column 0” which in my opinion gives little to no help at all. The second will check and confirm whether your RSS feed can be parsed properly. Once you actually fix your issue these 2 tools will confirm that you RSS feed is functioning properly.

In my case I continued to have errors testing with both feed URL checkers.  That meant something was still wrong.  I determined that some special characters that aren’t usable in the XML file. For my issue there was a “<” in part of my Site description.  Once I removed that the  W3 Validation check worked.

Fixing the Schema Error” XML document with no namespace; cannot determine any schema to use for validation

This doesn’t mean you have the exact same problem but in case you do you can see what I fixed.

<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Designed Bliss</title>
	<atom:link href="https://designedbliss.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://designedbliss.com</link>
	<description>Digital Content Creation For Blog &lt; Social Media</description>
	<lastBuildDate>Wed, 03 Jul 2019 13:01:16 +0000</lastBuildDate>

So once I changed my Site description and removed the ampsand it validated using both the NU HTML Checker and the WWW Feed Validation Service but I had other errors with several of the post descriptions and eventually needed to force the RSS feed to update to correct the post descriptions.

<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Designed Bliss</title>
	<atom:link href="https://designedbliss.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://designedbliss.com</link>
	<description>Digital Content Creation For Blog - Social Media</description>
	<lastBuildDate>Wed, 03 Jul 2019 13:01:16 +0000</lastBuildDate>

Now to force an instant RSS Feed update.

That required using one of 2 methods.

The first is to add a line into the functions file to force an RSS feed update every minute. Importantly that line has to be removed once the update occurs or it can become a resource problem. I decided that wasn’t the way to go, but still you can use this if you want to try it and then either comment it out or remove altogether once your feed updates.  If you do nothing your feed will update on a 12 or 24 hour window.

add_filter('wp_feed_cache_transient_lifetime', create_function('', 'return 60;'));

The other method is easy. I simply went to Settings > Reading > Syndication feeds show the most recent. I changed the number and saved the changes which forced the feed to update immediately to reflect the number of postings and their descriptions in the feed.

Need resources to grow your blog?

Check out my resource library here:

Resource Library

Others were interested in:

Looking for blog resources, printable you can quickly use?  Just sign up;  plus, you’ll get my freebies to start.

error

Enjoy this blog? Please spread the word :)

Subscribe for more
tips, ideas, promos.

Subscribe

Edit free into what you need when you need it without hassle or cost.  Get the tips.