Tuesday 30 December 2014

How to Prevent Wordpress site from Spam Comments and HTML Tags

| No comment

If you are working on Wordpress site, you will be facing the problem of spam comments. These comments contains tons of HTML codes which is basically links. You can prevent your wordpress blog from these comments by using these tricks. If someone uses the strong code, it will not bold the text etc. and want to prevent your site. So today I'll tell you about how to prevent your wordpress blog from spam comments and how to disable html in wordpress comments. So that you can prevent your blog from such issue. 




Web Design, Web Builder, Inernet, HTML, Computers, Wordpress, ewhw, ehow, how, why, what, blog




1. Remove unnecessary meta tags from WordPress header

Most of the spammers target blogs and wordpress sites for spams. If you look at the HTML source code of your WordPress site, you will find a couple of meta tags in the header that aren’t really required. For instance, the version of WordPress software running on your server can be easily retrieved by looking at your source header.
 
<meta name="generator" content="WordPress 4.1" />

This information is a good hint to WordPress hackers who are looking to target blogs that are using the older and less secure versions of WordPress software. To completely remove the version number and other non-essential meta-data from your WordPress header, add this snippet to the functions.php file found in your WordPress themes folder.

  remove_action( 'wp_head', 'wp_generator' ) ;
  remove_action( 'wp_head', 'wlwmanifest_link' ) ;
  remove_action( 'wp_head', 'rsd_link' ) ;

2. Prevent people from browsing your folders

Since you would not like anyone to browse your WordPress files and folders using the explorer view in web browsers, add the following line to your .htaccess file that exists in your WordPress installation directory.

Options All -Indexes
 
Also make sure that there’s a blank index.php in the wp-content/themes and wp-content/plugins folder of your WordPress directory.

3. Disable HTML in WordPress comments

The comment box in WordPress allows commenters to use HTML tags and they can even add hyperlinks in their comment. The comments have rel=nofollow but if you would like to completely disallow HTML in WordPress comments, add this snippet to your functions.php file.

add_filter( 'pre_comment_content', 'wp_specialchars' );
 
Tags : , , , , ,

No comments:

Post a Comment

Recent Posts Widget


Popular Posts

Accordition

What, How, Why is the question which initiates man to discover different things in world of science. Today every invent of science is due to these question. We decide to work on these question. But for this job your support is required. Please support us with your feedback. Thanks.

We search in two ways.
1. We search on different search engines and forums about questions and try to answer those questions by this blog.
2. People email us about their questions and we answer their questions via this blog.

What you think about, how much water required dialy, how to make bootable usb, how to connect dish tv, how to earn online money, online jobs, work at home are either fake sites or actual.

Feel free to contact us using email asifaliewhw@gmail.com or comment this blog for your feedback and questions.