How to Secure Your WordPress Site from Hack


For you, CMS WordPress users Self Hosting must be familiar with the name of the hack. One of the methods used to hack WordPress is by Cross-Site Scripting. This method makes the Hacker get access to view the contents of the wp-config.php file and able to manipulate the information in the database of a website, one of which is reset the admin password.

In this article, I will explain how to secure CMS WordPress from the hack by moving the wp-config file into safer folder i.e. folder etc. To facilitate the process of securing this wp-config file I use the cPanel control panel. For those of you who use other control panels can customize the tutorial below.

How to Secure WP-Config File

  1. Login to cPanel
  2. Then navigate to your WordPress folder directory

3. Copy the wp-config.php file to the / etc folder, by right-clicking – copy

4. Then check the folder etc., make sure there is a wp-config.php file in it

  1. Edit the original wp-config.php file that was previously copied with the following code. To edit by right-click edit
<? php

include ('/ home / usernamecpanel /etc/wp-config.php');

Replace usernamecpanel with your cpanel domain username.

  1. Then click Save.

Well, how to Secure WordPress from Hack. Hopefully useful and good luck.

READ ALSO  How To Easily Increase WordPress Score in GTMetrix


Please enter your comment!
Please enter your name here