WordPress Disable RSS Feed

Explains how to disable Wordpress RSS / Atom / RSS2 feed url in 2 simple steps.

Some webmasters and small business owners use WordPress as CMS. They may not need any sort of RSS feed. This is also good for security and private space blogs. You can easily disable all RSS feed by editing functions.php file. This file used to change the default behaviors of WordPress. It goes in your Theme’s folder. A Child Theme can have its own functions.php.

The functions file behaves like a WordPress Plugin, adding features and functionality to a WordPress site. You can use it to call functions, both PHP and built-in WordPress, and to define your own functions. You can produce the same results by adding code to a WordPress Plugin or through the WordPress Theme functions file.

How do I edit functions.php?

Click on Appearance > Themes > Theme Editor > Locate and edit your functions.php. Beware: if you do not edit file properly the results can be unexpected — even site-disabling. Make a backup of your exisiting file using ftp / sftp.

Fig.01: WordPress Themes Editor
Fig.01: WordPress Themes Editor

Make sure you add the following code between <?php ?> tags.

/**
 * Disable Our Feed Urls
 */
function disable_our_feeds() {
	wp_die( __('<strong>Error:</strong> No RSS Feed Available, Please visit our <a href="'. get_bloginfo('url') .'">homepage</a>.') );
}
 
add_action('do_feed', 'disable_our_feeds', 1);
add_action('do_feed_rdf', 'disable_our_feeds', 1);
add_action('do_feed_rss', 'disable_our_feeds', 1);
add_action('do_feed_rss2', 'disable_our_feeds', 1);
add_action('do_feed_atom', 'disable_our_feeds', 1);

Save and close the file.

Howto: Create a web page

One of our regular reader would like to know more about web page creation method. A Web page is a resource of information that is suitable for the World Wide Web and can be accessed through a web browser. For example this web site created using specialized CMS software called WordPress.

To create a web page, a text editor or a specialized HTML editor is needed. In order to upload the created web page to a web server, you need to use an FTP client. For example you can create a simple web page as follows using HTML language:
Step #1 : Start Notepad

Step #2 : Type the following program:

<html>
<head>
 <title>Hello World!</title>
</head>
<body>
  <h1>Hello world!</h2>
   This is my first web page. 
   I like to use <a href="http://gmail.com/">Gmail</a> as my mail client.
</body>
</html>

Step # 3 : Save and close the file as “test.html”

Step # 4 : Double click on test.html

Web template

Please note that the design of a web page is highly personal. You need to make a design according to your own preference. However, I recommend using
a pre-made web template to save your time. A web Templates let web page designers edit the content of a web page without having to worry about the overall aesthetics.

Many people publish their own web pages using web based products such as Geocities from Yahoo, Tripod, or Angelfire. These web publishing tools offer free page creation and hosting up to a certain size limit.

Special software

You can use HTML editor such as
=> Adobe Dreamweaver
=> Adobe GoLive
=> Microsoft Expression Web

Dynamic Web Creation software

Other ways of making a web page is to download specialized software, like a Wiki, CMS, or forum. These options allow for quick and easy creation of a web page which is typically dynamic. Wikipedia, WordPress, and PHPBB are examples of the above three web page options.

Linux worm targets PHP based application

There is news of a worm which uses a vulnerability in the PHPXMLRPC libraries to spread a computer virus. It is called as Linux/Lupper.worm. This is not just Linux or BSD specific it would affect anything that use the PHP. McAfee reports that

This worm spreads by exploiting web servers hosting vulnerable PHP/CGI scripts. It is a modified derivative of the Linux/Slapper and BSD/Scalper worms from which it inherits the propagation strategy. It scans an entire class B subnet created by randomly choosing the first byte from an hard-coded list of A classes and randomly generating the second byte.

WordPress blog software is secure from this attack :D Read the McAfee report here. More coverage is here and here.