Apr 18, 2016 Wordpress Development
How to Regain Access to Your Hacked WordPress Site?
No matter how much precautions you might be taking in protecting your WordPress site from hackers. You must always stay prepared to face the worst case scenario. In short, you must be ready with a solution to deal with the situation when your site is hacked. But, what could be more problematic is inability to log into your website’s admin panel despite trying numerous username and password combinations. Thankfully, there is a way that could help you deal with such an issue. You might not know but your site’s database provides a backdoor that can render you access over the backend interface.
As long as you’re able to access your database, you still can log back into the admin interface by making a few changes to your account. Through this article, we’ll be demonstrating the steps you need to follow for changing the admin user details of your website database.
But Before You Start
It is imperative that you’re creating a backup of your website, and most importantly, your database. Here’s a great article you can refer to for learning more about how you can backup your WordPress site: Backup and restore WordPress database with cpanel and phpMyAdmin. After all, your database is the last resort that could help you find a way to regain access over your hacked website. But remember, backing up your database using backup tools can be tricky when you don’t have access of your site. If that’s the case, then you could use phpMyAdmin to backup the database. For this purpose, you just need to abide by the following steps:
Step 1 – Open up your cPanel, and from there navigate to Databases → phpMyAdmin.
Step 2 – Next, choose your website or network’s database provided on the left-side of the screen. And then, press the “Export” tab positioned on the top of the page.
Step 3 – Finally, hit the “Go” button to choose any particular location on your system where you would like to save your database backup.
How to Update Your Website Database ?
So, now that you saved the backup of your website database, let’s proceed and talk about how you can change the account details from the database. To do so, follow these steps:
Step 1 – Again log into your phpMyAdmin via cPanel.
Step 2 – Move to Databases → phpMyAdmin from cPanel, and you will find entry of your website’s database on the left side. Simply, click on the database entry. And then, search for your admin username in the “wp_users” table list.
As soon as you find the username, hit the “Edit” button:
Step 3 – And at last, make changes to the email address provided in your account’s “user_email” field. Be sure to change the address to something that’s valid and easy to remember. After making the required changes, press the “Go” button to save all of your changes you have made.
Understanding How You Can Recover Your Site
After adding new email address within your account in the database, you’ll be able to win back access of your website’s backend using these steps:
1. Open up your site’s login page (i.e. http://www.yoursite.com/wp-admin)
2. Hit the link labeled as “Lost your password?”
3. Clicking on the link as shown in the image above will open a window, wherein you need to fill out the new email address you’ve just created in your database.
4. When you will open your email, you’ll find a link that allows choosing a new password. Once you have chosen a new password, use it to log into your website and review it.
Conclusion
Hopefully, this post will assist you in regaining access over your hacked site’s backend without much hassle. But, in case you still are finding it difficult to log into the admin panel, it makes sense to take help of an expert WordPress developer.