19-12-2019, 12:47 PM
So your website has been hacked and you can’t log in. Your database offers a convenient backdoor to help you regain access to your WordPress Administration Screens.
Website hacking is a nightmare for businesses and web developers alike. WordPress websites come with strong security protocols that are not easy to bypass. But still, they get taken down by hackers. Users also forget their passwords and sometimes the user email becomes invalid or hacked itself. You try to log in using several passwords and username combinations but nothing works. And then you lose your sleep and also fear to lose your online business.
In this tutorial, we will show you how to recover your WordPress Admin Screen in case you got hacked.
The Threats for WordPress
Almost every WordPress website comes under attack. In fact, estimates suggest that hundreds of WordPress websites are attacked every minute. One of the most common forms of attack is Brute Force attacks where attackers use bots to try and decipher your account passwords. Once they get access to your account, they can then install malware or just disrupt the site services and even take down the site entirely. If you did not have a site backup you would lose all your website’s data.
But all is not lost! There is still a way to recover your website by changing your username while accessing your database. You have to sign in to phpMyAdmin and carry out the changes before you can recover or restore your website.
Below are the steps required to change your password and get back into your WordPress Admin Screens.
Step 1. Log in to phpMyAdmin
If you don’t already have a strategy in place for regular backups of your website, you can still backup your database using phpMyAdmin. It is important to have a backup your Database before you make any changes. After the backup process is over, you can log in to your Website via cPanel go to Databases > phpMyAdmin and then log into phpMyAdmin. Next, look at the left side and choose your website’s database. From the list, scroll down and select the wp_users table.
You will have to look for your Admin username here. Once you find it, click on the Edit tab located on the same line.
Step 2. Edit the Email Address
Your current email address will be displayed in the user_email field. Change this field with an email address that you can log into and access. After you have successfully entered your email address, select the Go button located at the bottom part of the window.
Step 3. Analyze and Restore your Website
Enter the login page URL of your website or navigate to it manually. You will see an option which says- Lost your password? under the sign-in box. Click on it and enter the email that you just entered in phpMyAdmin. Then select Get New Password.
Step 4. Check Your Email
Open your email inbox to find the link to set a new password. Remember to make your password strong enough so that it can survive another hacking attempt.
Tips to prevent hacking and other attacks
How To Backup The Database Using cPanel?
It is best to create a regular backup of your WordPress website. You can recover your website by using the backup file anytime it gets attacked. Let’s discuss how to make backups now.
# 1. Use cPanel to Export The Database
From cPanel go to Databases > phpMyAdmin and look for your website’s database on the left side. Then click on it and choose the Export button at top of the window.
The Quick setting is sufficient for backing up the database. Click on ‘Go’ and select the destination target to save the file.
# 2. Restoring the Database
In case you want to restore the database of your Website, use cPanel and navigate to phpMyAdmin and select your database. Then from the top of the window choose the ‘More’ tab. And then you will get a drop-down menu, click on Import.
# 3. Choosing the backup file
Now you have to find the backup file saved earlier on your computer. Select the ‘Choose file’ tab, browse and get the backup file. Then tick on the ‘Go’ button to perform the recovery process. Your Website will retain everything from the last backup you created.
This tutorial showed you How to Get Back Into the WordPress Admin Screen after your Website was Hacked. Hopefully, after reading this article you would have heaved the sigh of relief!
If you have anything else to say, please share your opinion in the comments section. Your opinion matters, unless it is a Spam.