…and the damn RSS feed is back too

RSS Feed

Not only has the /shared/ folder been missing in action, my RSS feed has been busted for the last year. Apparently, this is a fairly common problem with modded WordPress installations, but it isn’t quite fair to blame on the actual WP core files.

You might have seen these frustrating warnings when trying to load up the /feed/ on your own WordPress site:

This page contains the following errors:
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.

XML Parsing Error: XML or text declaration not at start of entity
Location: http://www.quickonlinetips.com/archives/feed/
Line Number 2, Column 1:

And what it all comes down to is some really picky behavior on the part of the XML validators and WordPress. If a blank line or some spaces gets left in the wrong PHP file, it can be processed as an extra line in your XML doc. So just a little bit of empty space can really screw things up royally!

Luckily, you have a few options to fix this problem – and hopefully it doesn’t take you as long to track down as it did for me.

Theme functions.php

Since it was the last place I had to look, I’ll post this one first. If you go in to your wp-content/themes/[yourtheme], there will be a functions.php file. Delete any blank lines, then head to the end of the file and delete any stray spaces hanging out there. I finally got around to this and BAM, it was working again in seconds.

/WP-Includes/*-feed*.php

You might be able to alter these files to over-ride any blank lines generated in your feed. This particular solution didn’t work for me, but you might have better luck following the instructions posted here.

Automate it

Don’t like messing with code? Don’t want to spend 13 months looking for the problem? Me neither, but I’ve got this server locked down like a fortress so the plugin-route wasn’t available to me. If you want to install a small file and let it hunt down the problematic coding, listen up.

First you download this file. Then you upload it to your WP root directory and add one little line to your index.php file:

include("wejnswpwhitespacefix.php");

There you go. That little bit of PHP will find the blank lines and spaces that give you nightmares and cost you feed subscribers.


I can’t pretend I’m a good role model right now. One month is way too long to let a feed sit broken, so a full year of it is downright embarrassing to admit. Anyway, if you follow the directions outlined here, you won’t have to wait so long to get your own feed back up.

Be the first to comment

Leave a Reply

Your email address will not be published.


*