Breadcrumbs

Home Web Development What to do when a Worpress site gets hacked or compromised
What to do when a Worpress site gets hacked or compromised PDF Print E-mail
Written by Administrator   

 

In case your Wordpress site  gets hacked or compromised, it is essential that you change your WordPress Salt keys immediately.  This is necessary because a hacker can still login to your WP admin even if you change your WP password!
This is because the hacker can still remain logged in to your WP admin  via the use of cookies, in which using your old  salt key contained in the config file.
Below are the steps you will have to perform in order to replace your current WordPress security keys.

1. Open https://api.wordpress.org/secret-key/1.1/salt/ and then refresh your browser. Then copy the eight key values.

2. Open your wp-config file, which is located in your root WP folder (for example public_html of your hosting account). You will see these rows. This is where Wordpress stores the salt key for recurity

define(‘AUTH_KEY’, ‘put your unique phrase here’);

define(‘SECURE_AUTH_KEY’, ‘put your unique phrase here’);

define(‘LOGGED_IN_KEY’, ‘put your unique phrase here’);

define(‘NONCE_KEY’, ‘put your unique phrase here’);

define(‘AUTH_SALT’, ‘put your unique phrase here’);

define(‘SECURE_AUTH_SALT’, ‘put your unique phrase here’);

define(‘LOGGED_IN_SALT’, ‘put your unique phrase here’);

define(‘NONCE_SALT’, ‘put your unique phrase here’);

/**#@-*/

3. Replace the existing security keys which will look similar to:
define('AUTH_KEY',         'bQ5NB34}?ud+EkX.RMs.KTUp`Jeb.sYxb&6Bve8k!-9SEj0T}}TT%++5EG%a(}0j');
by pasting the new ones you have obtained  in from the random generator  in place of:
'bQ5NB34}?ud+EkX.RMs.KTUp`Jeb.sYxb&6Bve8k!-9SEj0T}}TT%++5EG%a(}0j'
Make sure all above salt keys are replaced.

For more info click here