
![WordPress RSS Feed Is Empty [Bug Fix] WordPress RSS Feed Is Empty [Bug Fix]](/images/blogarticle/22.jpg)
Maruf scribbled this post.
I recently upgraded BrightCherry‘s wordpress version from 2.3 to 2.5. As soon as I did that I noticed our RSS feed stopped working. Hmm…strange.
I Googled around and I couldn’t find much on the issue. I found one discussion over at WordPress Trac; where someone else had also experienced the same issue.
However, I don’t know if it’s just me, but I found that discussion beyond difficult to digest. It’s formatted in such a weird way, and everyone is talking in riddles and out of sync. After having spent 30mins trying to work out what the contributors were talking about, I eventually managed to untangle their code and walk away with a fix.
The Problem
Certain rewrite rules were changed in the 2.5 version, so a lot of people that have their blog contained in a sub-dir are only likely to suffer from this problem. For example, if you’re blog is located in http://www.example.com, you should be fine. But if you’re blog is stored in htttp://www.example.com/blog/, you may suffer from this weird empty RSS feed condition.
I’m not entirely sure how wide spread this issue is, but it happened to us, and this is how I fixed it…
The Fix
I downloaded the complete WordPress 2.5 zip file again. I then modified rewrite.php
File location: wp-includes/rewrite.php
From line 809 – 814, you’ll need to modify the following:
From:
$default_feeds = array(
'.*wp-atom.php$'=>$this->index .'?feed=atom',
'.*wp-rdf.php$' => $this->index .'?feed=rdf',
'.*wp-rss.php$' => $this->index .'?feed=rss',
'.*wp-rss2.php$' => $this->index .'?feed=rss2',
'.*wp-feed.php$' => $this->index .'?feed=feed',
'.*wp-commentsrss2.php$' => $this->index . '?feed=rss2&withcomments=1');
[/pre]
To:
$default_feeds = array(
'.*/wp-atom.php$'=>$this->index .'?feed=atom',
'.*/wp-rdf.php$' => $this->index .'?feed=rdf',
'.*/wp-rss.php$' => $this->index .'?feed=rss',
'.*/wp-rss2.php$' => $this->index .'?feed=rss2',
'.*/wp-feed.php$' => $this->index .'?feed=feed',
'.*/wp-commentsrss2.php$' => $this->index . '?feed=rss2&withcomments=1');
[/pre]
The only change was the forward slash (/) after the *. See it? Good.
After that, I uploaded all the WordPress version 2.5 files again (including the newly modified rewrite.php file). Then I run /wp-admin/upgrade.php
Bingo! That seemed to fix the problem, and now our RSS feed is working once again.
Has anyone else suffered from this problem, and did this fix help? Let us know.










comments
Hey.
I’m having problems with my rss feed myself. For some reason it stopped working. I run wp2.2.2 and my blog sits on the domain itself and not in a subfolder. any ideas?
Hey Neo,
What’s the url of your blog?
Great fix. Sorted out my RSS problem
Hello,
I tried this but my RSS still isn’t working. Think it’s a bug with 2.7, lots of people having RSS problems it seems. Any ideas?
http://www.michelle-reader.co.uk/Blog
Seems to be working:
http://www.michelle-reader.co.uk/Blog/feed/
So it is!
Thanks
me too, having probs. my http://url/feed returns blank
if i register it in feedburner it says An error occurred connecting to the URL: Error getting URL: 500 – Internal Server Error
totally clueless here
Hee
Great job.. it works again..
Had to problem in all of a sudden.
Marco
Thank you SO much! I ran into the problem when I upgraded to version 2.9.1. I couldn’t find anything helpful online until I found your post.
I added the / like you suggested, re-uploaded just that one file, and ran the upgrade.php file. And it worked! My RSS is back up and running.
Same problem. Had to fix some of my posts so that the blog.url/feed -> VALID (http://feedvalidator.org/)