Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Using FeedBurner

You may want to use FeedBurner to power your feeds and make them available for everyone to subscribe to. FeedBurner is sometimes preferred for serving feeds as it has detailed statistics and display options such as sharing buttons.

FeedBurner is an external service owned by Google and is in no way associated with the WordPress project.

Setup

You want all your feeds to automatically redirect to FeedBurner. This way, new and old subscribers (including aggregators such as Google Reader) will automatically start fetching from FeedBurner instead.

You could of course notify your readers that your feed is also available at http://feeds.feedburner.com/yourfeed, but users are lazy.

There are three options to accomplish this. Use a plugin, custom function, or edit your .htaccess file. Most people prefer the ease of plugins so we'll start with that.

Plugins

Installing a plugin may simplify the process of enabling the redirection to FeedBurner. Here are a few:

Plugin notes, probably outdated

Note: If you have WordPress installed into a folder other than your root folder, you may encounter errors. If so, try Thatedeguy's Hack for a workaround.

If you have index.php in your permalink structure you have to use this hack. This hack only forwards part of the RSS feeds. To forward all of your feeds to FeedBurner use This hack

Custom Function

For those who prefer a function instead of a plugin, you can use the following code. It uses the feed_link action hook and replaces all instances of your default WordPress feed (rss, rss2, atom, and rdf). Rename the function and remember to replace the url with your FeedBurner url.

// replace the default posts feed with FeedBurner
function appthemes_custom_rss_feed( $output, $feed ) {
    if ( strpos( $output, 'comments' ) )
        return $output;

    return esc_url( 'http://feeds.feedburner.com/AppThemes/' );
}
add_action( 'feed_link', 'appthemes_custom_rss_feed', 10, 2 );

For more use cases, see the Resources links below.

Editing .htaccess

You need an .htaccess that is created/modified by WordPress via the Permalink/mod-rewrite option. Go to Settings > Permalinks in the wordpress administration menu and enable "fancy" urls by adding /%year%/%monthnum%/%day%/%postname%/ at "Custom Structure".

Let's say your blog's feed is currently completely managed by WordPress at http://example.com/wp-rss2.php (or http://example.com/feed/rss2/), and you want your subscribers to instead subscriber to the FeedBurner feed, which is at http://feeds.feedburner.com/yourfeed.

You must first modify your .htaccess file by following the instructions at Redirecting RSS to Feedburner.

Adapted from The support forum

Resources