Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Alter the WordPress RSS Widget’s Refresh Rate

As amazing as the built in WordPress RSS widget can be there are times that it just doesn’t update fast enough. Thanks to the fact that WordPress is so easy to customize we can easily change this. In this article, we will show you how to alter the WordPress RSS Widget’s refresh rate.

All you have to do is add the following code to your theme’s functions.php file or into a site-specific plugin:

add_filter( 'wp_feed_cache_transient_lifetime', 
   create_function('$a', 'return 600;') );

In this example it is set to refresh every 600 seconds, or 10 minutes. Simply change this number to whatever you want and your RSS widget will refresh accordingly.


Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

5 CommentsLeave a Reply

  1. This looks great and all…but what are the server-side implications?

    Lowering the refresh rate makes the server work extra hard to deliver in less time? Does this affect the database in any way?

    I also wonder if this affects blogger who use FeedBurner?

    I’m manly curious because I’ve had some problems with my server a few times (too much processing consumption), causing the WordPress site to go offline. Could this hack create any problem for sites that have many visitors daily?

    Cheers on the post!

    • Ofcourse lowering the refresh rate time increases server load. You wouldn’t do this for sites that you do not update very often. For ex. if you are pulling your blog feed where you only post once a day, then you don’t need to do this.

      Understand all we are doing here is lowering the transient cache time. It does not run the query on every pageview. For ex. if you had it set to run twice a day, you can have it run for four times a day. Hope this helps your question about daily visitors.


  2. Useful info as ever boys.
    I’m still rather taken with the comment system you have set up here.

    Like the idea of integrating twitter and facebook.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.