How to get back to a WordPress admin after being hacked? If you are also struggling with this then, you are at the right place. It is crucial to keep your WordPress website safe and secure. Thus, it is helpful to know that you won’t lose everything if ever your WordPress gets hacked. Because you always have a backdoor database entry channel through which you can reach your site’s admin section, in a very convenient way. In this guide, I will show the way to get back to your WordPress admin after being hacked. So, let’s get down to it!

You may lose access to your website’s admin section because of a number of reasons. The website may fail to establish a network connection, can have its memory limit exhausted, and may suffer from PHP error as well. In these conditions, you would not be able to log into your admin account. However, you may also forget the password, and the admin account’s email may no longer be valid because of some reason. Thus, it can be one other reason why you would fail to login into your account.

Whereas, another major reason when you would not be able to log in to your website is when it gets hacked. If so, you lose all your admin-related privileges. Hackers gain entry to your website’s admin panel through a backdoor and then delete all your admin privileges and infect your website. You will not find any theme or plugins on the website when it has been hacked. Well, here at TemplateToaster WordPress website builder check out how to back your WordPress admin.

How to Get Back to WordPress Admin After Being Hacked

When all of your admin privileges and data have been deleted then, you can only log in to your website through a new “admin user” id. And that you can create by going into the phpMyAdmin section. This step-by-step guide will help you to create a new “admin user” within the WordPress website’s database using MySQL. However, it is always better to have a backup for all your website data before you undertake any kind of MySQL editing. All you have to do is to follow the following steps and you will be able to get back to your WordPress website.

Find your WordPress database after logging in to phpMyAdmin. You have to login into the “cPanel” and then should follow the path.

DatabasesphpMyAdmin

Once you reach your database, you need to change two tables i.e. wp_users and wp_usermeta.

Fill in the Details For wp_users Table

When you click on the wp_users table, you will find the insert tab as shown below.

How to get back to your WordPress admin after being hacked

You need to fill the following fields here. 

  • An ID – You can pick any number
  • User password – Use any password and also select MD5 from the given function menu.
  • User login – Use any username that would provide you access to the dashboard of your WordPress website.
  • and User nickname – Add a nickname or any other name
  • User email – Add a verified email id that you want to associate with this account.
  • User URL – This will be the URL of your website.
  • and User registered- Select the time and date as to when the user has been registered on the website.
  • Display name- Add a display that can also be the same as your nice name.

Next, click the “go” button.

Fill in the Details For wp_usermeta Table

After completing the WP_Users table, you need to fill in the WP_usermeta table as well. Click on the wp_usermeta table and next click the “insert” tab. Now fill in the below-given information.

  • Meta_id – As it will be auto-generated and you should add no value here
  • User id – This would be the same user id that you had created in the first step.
  • Meta key – The wp_capabilities
  • Meta value – Insert the value a : 1:{ s : 13 : “administrator” ; s : 1 : “1”;}
  • You have to add 1 more row of information in the process.
  • Unmeta id – Leave this value blank as it would be auto-generated
  • User id – This would be the same id that you created in the first step
  • Meta key – This would be wp_user_level
  • The meta value – 10

Now, you can click on the “go” button after creating a new id or username for yourself. Moreover, you can use the new login credentials for logging into the wp_admin. Make sure you are using the same username and the same password that you specified and used before. So, once you log in successfully, you will be inside your WordPress admin. Of course, you can now edit the username that you have created in the above step. Finally, click on the website’s “Save” button so that the new username gets added to the database. However, WordPress will add more relevant information to this newly created account.

Reviewing And Recovering The Website

Now, you can easily gain access to the backend section of your WordPress website. Go to your login page, click on the “lost your password link” enter the new email id that you added to your account earlier. And then click on the “get new password button.” You will receive an e-mail that offers you a link for choosing any new password. Be careful and make sure to choose a strong password this time. Maybe a mix of characters, letters, and signs can help.

Once you log in to your website, install the latest updates so that you can easily avoid the security loopholes. However, there are many solutions that can help you to scan the malicious codes. You can use them to ensure greater security for your website. For instance, VaultPress and Defender are a few tools in this area that are quite efficient. You can install a backup-restore solution as well.

Sucuri Security

Sucuri is one of the best website security provider companies. This is a free plugin. So, you can easily use it for your website. Simply run the scan so that the software can check the integrity of your files, malicious codes and do a security audit. However, this security plugin will also recommend certain options that ensure fool-proof security for your WordPress website.

Rare Cases

Well, there would be rare cases when the hack would come back again and again. Sometimes you would not be able to locate the right malicious code. You need to understand that hacks affect thousands of websites at the same time. Therefore, the official WordPress online forums are one of the best places where you can get the best and most comprehensive support. Here you will get knowledge from WordPress experts and other users. So, by describing your problem in detail, the chances of getting help increases.

In Conclusion

The Web is always exposed to attacks made by hackers and bugs. You should always have the most recent updates duly installed on your website and use all security measures available to you, in order to remain safe. If you have any doubts or questions, please feel free to leave me a message below.

[call_to_action color=”gray” button_icon=”download” button_icon_position=”left” button_text=”Download Now” button_url=”https://templatetoaster.com/download” button_color=”violet”]
Best Drag and Drop WordPress Theme Builder
[/call_to_action]