How to Disable RSS Feeds in WordPress | Pickup WP

Are you looking to disable RSS feeds on your WordPress site? RSS feeds allow users to subscribe to your blog posts.

However, when building small static websites, you may want to turn off the RSS feeds. By default, there is no option to remove RSS feeds in WordPress.

In this post, we will show you how to disable RSS feeds in WordPress.

Ways to Disable RSS Feeds in WordPress

Today, I’ll explain you how to disable the RSS Feed in WordPress using two different methods. The first and simple method is to use the Disable Feeds plugin. This plugin is ready to use as soon as it is activated.

The second method includes code snippets that disable the RSS Feed by returning an error message to visitors. Keep in mind that both options disable the RSS feed rather than removing it from the website.

Method 1: Disable RSS Feeds Using a Plugin

The first thing you need to do is install and activate the Disable Feeds plugin. For more in detail, see our guide on how to install a plugin in WordPress.

The plugin is ready to use and will send customers to your website when they request an RSS feed.

There are a few options for the plugin’s settings. You’ll need to go to the Settings » Reading page to set them up.

Disable Feeds Plugin Settings

When visitors request a feed, the plugin defaults to redirecting them to related content on your site. For example, Users who request a category feed will be redirected to a category page. Users who try to access the RSS feed for a custom post type will be redirected to the custom post type archive.

You can change this behavior and display a 404 error page to users.

Method 2: Disable RSS Feeds Using the Code Snippet

The second approach to deactivating RSS in WordPress is a little more difficult since you’ll have to manually edit your theme’s code.

Important! Changing the coding may result in the website’s damage. If you are unsure about your skills, consider consulting with a specialist.

Go to the template folder and find the functions.php file to prevent RSS feed generating. Insert the following code: function wp_disable_feed() { wp_die( __( 'No feed available, please visit the homepage!' ) ); } add_action('do_feed', 'wp_disable_feed', 1); add_action('do_feed_rdf', 'wp_disable_feed', 1); add_action('do_feed_rss', 'wp_disable_feed', 1); add_action('do_feed_rss2', 'wp_disable_feed', 1); add_action('do_feed_atom', 'wp_disable_feed', 1); add_action('do_feed_rss2_comments', 'wp_disable_feed', 1); add_action('do_feed_atom_comments', 'wp_disable_feed', 1);

Whenever someone tries to access the RSS feed, the No feed available error will pop up.

RSS Feeds Disable Message

If you want to go further, you can remove RSS links generation from the title. Copy the following code to the functions.php of the theme: remove_action( 'wp_head', 'feed_links_extra', 3 ); remove_action( 'wp_head', 'feed_links', 2 );

Conclusion

So the RSS Feed is out of date. It is best to disable it. There are a few options for doing this. If you aren’t experienced with coding or finding the right files, I recommend using the plugin method. This method is much faster and easy to use.

That said, the coding method works well, and if the plugin mentioned above fails, this is the way to go.

I hope this guide showed how simple it is to disable the RSS Feeds in WordPress. If you liked this post, you might be also want to read: