How to Regain Access to Your Locked WordPress Website

Date:

Share post:

The Solution to Regain Control of Your WordPress Site

Discovering that you have lost access to your WordPress website due to hackers deleting your admin account can be distressing. But don’t worry! In this article, we will provide you with a step-by-step guide on how to add an admin user to the WordPress database using MySQL. By following these simple instructions, you can regain control over your website and put an end to your frustrations.

Adding an Admin User to the WordPress Database

If you want to add an admin user to your WordPress database, you will need to use a powerful web-based tool called phpMyAdmin. Many leading WordPress hosting providers include phpMyAdmin as a pre-installed feature in their cPanel dashboard, allowing for easy management of MySQL databases.

  1. Access phpMyAdmin: Start by logging in to your hosting account and navigating to the Databases section. Here, you will find the phpMyAdmin icon. Click on it to open the interface.

  2. Select the WordPress Database: Within the phpMyAdmin interface, you will see a list of databases displayed in the left column. Choose the database associated with your WordPress website.

  3. Edit the wp_users Table: Locate the wp_users table and click on it. This table contains a list of all the users currently registered on your website.

  4. Insert a New Admin User: Find and click on the ‘Insert’ tab at the top of the screen to add a new user. Provide the required information, including a unique user ID, username, password, and email address.

  5. Edit the wp_usermeta Table: Look for the wp_usermeta table and select it. Once again, click on the ‘Insert’ tab to create a new row.

  6. Add Meta Information: Enter the appropriate meta information for fields such as user_id, meta_key, and meta_value. Make sure you input the correct details for each field.

  7. Save Your Changes: Once you have provided all the necessary information, click the ‘Go’ button to store the new user in the database.

Congratulations! You have successfully added a new admin user to your WordPress database using MySQL. You can now log in to your WordPress admin area using the username and password specified for the new user.

Additional Steps to Enhance Website Security

After regaining access to your WordPress website, it is crucial to take some additional measures to enhance its security and protect it against future hacking attempts:

  1. Update Passwords: Change the passwords for all existing user accounts, including the original admin account that was deleted.

  2. Follow a WordPress Security Guide: Familiarize yourself with our comprehensive guide on WordPress security, which outlines the best practices for securing your website and defending it against potential attacks.

  3. Regularly Backup Your Database: Create regular backups of your WordPress database and files to ensure that you always have a recent copy in case of emergencies.

  4. Consult a WordPress Error Guide: Be sure to check out our detailed guide on common WordPress errors and how to resolve them. This resource will help you troubleshoot any issues you may come across during the recovery process.

A Final Note

Being locked out of your WordPress website is undoubtedly a setback. However, armed with the right tools and knowledge, you can regain access and strengthen the security of your site. Adding an admin user to the WordPress database via MySQL allows you to overcome this obstacle and resume efficient management of your website. Always prioritize website security to prevent future hacking attempts. If you found this article helpful, please consider subscribing to our YouTube Channel for more WordPress video tutorials. Stay updated by following us on Twitter and Facebook.

Subscribe to our newsletter

Stay ahead of the game! Subscribe to our newsletter for exclusive tips and insights on Data Structures & Algorithms and interview preparation.

Leave a Reply

Related articles

10 Effective Growth Hacking Techniques to Boost Your Online Influence**

The Influence of Online Power: 10 Techniques for Boosting Growth In today's digital world, having a strong online presence...

Boost Your Productivity with Checklists: An Essential Tool for Every Blogger and Marketer

The Power of Using Checklists: Enhancing Your Efficiency as a Blogger or Marketer In the fast-paced world we live...

Convert Webpages to PDFs: A Simple Guide**

Finding an easy and reliable way to convert webpages to PDF files can be a daunting task. Many...

Mastering Freelance Success: Key Tips for Building a Thriving Career

Keys to Creating a Successful Freelance Business: Essential Strategies and Techniques Introduction: Flourishing in the Freelance Economy As the gig...