WordPress is an open-source platform for any type of websites: whether it is blog, CMS or any other custom solution. Secure wordpress sites should be our first priorities. In this WordPress tutorial you will find tips and tricks for securing WordPress and optimizing your WordPress site. This section will going to cover the tips related to securing your WordPress site. Tips includes protecting files, login restriction, WordPress admin restriction, database protection, etc.
1. Server Security
Block WP- folders from being indexed by search engines, the best way to block them in your robots.txt file. Add the following line to your list:
Directories should not be left open for public browsing