Is there a way to force RSS feed update on my website? My problem is after I have made changes to a blog post? I have noticed that once the content is published, the RSS feed is sent and I can see it in my own RSS reader, but then I cannot update it anyhow, even if I change everything in the post. Frustratingly, the RSS keeps showing the old version, even after I manually update my feed reader.
By default what happens is when you update posts, tags or categories on your website, the content sent via RSS feed remains the same for longer period of time. The reason is default feed update cycle of WordPress is twelve hours.
Solution to this common issue is easy, what you have to do is change the default update cycle of WordPress to a lesser period of time i.e. 30 or 60 seconds. This can easily be done by using following snippet of code:
add_filter('wp_feed_cache_transient_lifetime', create_function('', 'return 60;'));
You simply need to copy and paste this line code into your theme’s function.php file or you can use it on Code Snippet plugin which provides you a better way of implementing new PHP functions on WordPress.
Now what this PHP snippet will do is, it will update your RSS feed in a minute, then you may check the updated feed of your website and remove the code to return back to the default feed cycle of WordPress.
Leaving this code active on your website will utilize more resources. Hence it is better to deactivate the code and use it only when you need it.
Another easy trick that works sometimes – Login to your WordPress admin area Settings -> Reading and change the number in ‘Syndication feeds show the most recent‘ option, this also updates the RSS feed. Once feed is updated, you may change the number back to whatever it was before.
Although this trick works but we still do not recommend this method because first it re-publishes the feed each time you change the number which results in displaying duplicate posts to your feed readers, though newly updated posts are shown on top. Second – this trick works due to a bug in WordPress which off-course will not be there forever.