How to secure WordPress sites using .htaccess (Important Method)

WordPress is one of the mostly used Content Management System in the World and also It is one of most exploited CMS in the world.
Any website can be hacked, Even most protected website can be hacked. 
As a website owner, It is your responsibility to ensure that, hacking your website should not be possible by anyone.  Do not give easy access to the hacker by having an insecure website. There are many ways to protect your WordPress Website. 

The following is one of the MOST important steps in protecting your WordPress website.
Step 01:
Add the following line in your wp-config.php 
Code:
#Added by HostingRaja Security Team, Please do not remove
define('DISALLOW_FILE_EDIT', true);

Append the following in .htaccess in your public_html (If file is not there, create it)


Code:
<Files *.php>
    Order Deny,Allow
    Deny from all
</Files>
<Files index.php>
    Order Allow,Deny
    Allow from all
</Files>
<Files wp-login.php>
    Order Allow,Deny
    Allow from all
</Files>

Append the following in .htaccess in your public_html/wp-admin (If a file is not there, create it), This will protect your wp-admin area.

Code:
<Files *.php>
Order Deny,Allow
Deny from all
</Files>
<Files ~ "^(about|admin-ajax|admin-footer|admin-functions|admin-header|admin|admin-post|async-upload|comment|credits|custom-background|custom-header|customize|edit-comments|edit-form-advanced|edit-form-comment|edit-link-form|edit|edit-tag-form|edit-tags|export|freedoms|import|index|install-helper|install|link-add|link-manager|link-parse-opml|link|load-scripts|load-styles|media-new|media|media-upload|menu-header|menu|moderation|ms-admin|ms-delete-site|ms-edit|ms-sites|ms-options|ms-themes|ms-upgrade-network|ms-users|my-sites|nav-menus|network|options-discussion|options-general|options-head|options-media|options-permalink|options|options-reading|options-writing|plugin-editor|plugin-install|plugins|post-new|post|press-this|profile|revision|setup-config|theme-editor|theme-install|themes|tools|update-core|update|upgrade-functions|upgrade|upload|user-edit|user-new|users|widgets)\.php$">
        Order Allow,Deny
        Allow from all
</Files>