Security issues with WP sites

wordpress configuration file is located in the root.In the event that PHP stops functioning on webserver for any reason.we run the risk of this file being displayed in plaintext,which will give our password and database information to visitor.
you can safely move wp-config directory up out of root directory.this will stop if from accidentally served. WordPress has built-in functionality that automatic check parent directory if it cannot find a configuration file.

In this situations on certain hosts, is not option. An alternative on Apache web servers is to set your .htaccess to not serve up the wp-config file.
Add the following line to ur .htaccess file in the root directory.

<FilesMatch ^wp-config.php$>deny from all</FilesMatch>