How to recover hacked wordpress blog
Well hacking of wordpress blogs became more easy and popular and i saw many blogs are being hacked by noobs nowadays.
Last night our server got an attack by those noobs and all of our wordpress blogs (old version) were injected by the code saying “hacked by bla bla”.
What they have done with wordpress?
1. They have injected their code into blog’s database and changed the password and admin email address to override admin access to backend. So administrator is not able to retrieve his lost password to get access back.
2. They have injected the code into templates file named “index.php” saying “hacked by bla blaa”
Here is the quick solution to fix both of them:
Get admin access back:
1. First of all you will need to get admin access back, for this login to phpmyadmin from cPanel and then navgiate to the wordpress database, see snapshot below:
2. Now select the users table and choose the row that contains admin details, see below snapshot:
3. Edit the row and change the email address with your new working email address and save it.
4. Ok, now goto the following link: http://yourdomain.com/wp-admin and use forgot password link to reset your password.
You will get the reset password confirmation email follow the steps given in that email.
How to remove hacker’s message “Hacked by bla bla”
1. Just login to your FTP or to cPanel File manage and navigate to your wordpress templage files located in public_html/wp-content/themes/templatename
2. Now replace the index.php file with the original template’s index. php file. You should have this template file or re-download it. Ok, this is done.
Your blog will become back now i will tell you how do you secure your blog from hacker.
Secure wordpress blog:
1. Keep your wordpress blog uptodate.
2. Install following plugin:
- Sucuri Free
- Exploit Scanner
- Block bad queries
- Anti malware shield
- Exploit Scanner
3. Do not install nulled/cracked plugins and templates.
4. Check your hosting account for any malicious files and folders, possibly shells, remove them.
5. Check template files for malicious code and base64 code and remove them.
For more information on securing wordpress blog google it you will find various methods there.