Important tips for Security of a WordPress Website

BySlide Scope

Important tips for Security of a WordPress Website

Security of a WordPress Website

  1. Protect from Spammers : Find this line in the header.php file of your wordpress –
<meta name=”generator” content=”WordPress <?php bloginfo(’version’); ?>” />

and remove the php code and make it look like:

<meta name=”generator” content=”WordPress  | Or Whatever You want here” />

If you can’t find the meta tag:

Place this line of code in your functions.php file.

 

remove_action(‘wp_head’, ‘wp_generator’);

 

This will remove <meta name=”generator” > tag from wordpress.  Changing this meta tag is important because of spammers. If they know the version of your wordpress website it becomes easy for them to post spam comments. It also prevents hack attempts.

  1. Use Passwords that are atleast of 8 characters with mix of numbers, special characters, capital and small alphabets etc.
  2. Use plugins to restrict number of login attempts, there are many security plugins like wordference, etc. to protect your site from unauthorized access as well.
  3. You must protect your /wp-admin/ directory using the .htaccess file in your root folder. You can set access controls to particular IP addresses.
  4. Protect your website from BAD BOTS which try to hack your site using Libwww-perl .

Simply write this line in your .htaccess :

SetEnvIfNoCase User-Agent “^Libwww-perl” bad_bot

<Limit GET POST>

Order Allow,Deny

Allow from all

Deny from env=bad_bot

</Limit>

To do this Go to You Hosting >> Root Domain of your site >> Find .htaccess file and past the code just above the line “# END WordPress”

This step will help you in improving your SEO score as well.

 

  1. You can use robots.txt file to allow or disallow directory access for search engine bots –

User-agent: *Disallow: /abc/wp-admin/Allow: /abc/wp-admin/admin-ajax.php Here “abc” is the directory where you have installed your wordpress.

 

  1. When you are on the urge of installing a new theme or a plugin make sure to have a look at it’s rating, reviews and bugs report. Install trustworthy plugins with considerable amount of installations.

Please comment below if you have more suggestions security of a wordpress website.

print

About the Author

Slide Scope administrator

Slide Scope Posts are written by experts from Core Information Technology and Digital Marketing Industry. We have assistants from Management Science as well.

    Leave a Reply