How to Bypass WordPress Login: 6 Easy Methods That Work
How to Securely Access Your Dashboard: 6 Reliable Methods to Bypass WordPress Login Issues
Getting locked out of your WordPress dashboard can bring your business to a grinding halt. Whether you’ve forgotten your password, lost access to your admin email, or encountered a sudden database error, being unable to log in is a stressful situation for any website owner.
Fortunately, there are several reliable ways to regain entry to your site. In this guide, we’ll walk through six proven methods to bypass a WordPress login block safely and restore your administrative control.
1. Reset Your Password via the Login Screen
The simplest and most direct method is using the built-in password recovery feature. Navigate to your login page (usually yourdomain.com/wp-login.php) and click the “Lost your password?” link. Enter your username or email address, and WordPress will send a reset link to your registered email.
Chat with an engineer on WhatsApp within 15 minutes.
2. Reset Your Password via phpMyAdmin
If you no longer have access to your admin email address, the recovery link won’t help. In this case, you can directly update your credentials through your hosting control panel using phpMyAdmin:
- Log in to your hosting account and open phpMyAdmin.
- Select your WordPress database from the sidebar.
- Locate and click on the
wp_userstable (your table prefix might be slightly different). - Find your admin username and click Edit.
- In the
user_passfield, delete the existing value and type your new password. - From the dropdown menu next to the field, select MD5, then click Go at the bottom of the page.
3. Create a New Admin User via FTP
If database access seems intimidating, you can create a new administrator account by adding a snippet of code via FTP or your file manager.
- Access your site using an FTP client or your host’s File Manager.
- Navigate to
public_html/wp-content/themes/your-active-theme/. - Download and open the
functions.phpfile. - Add the following code to the bottom of the file (be sure to replace the placeholder details with your own):
function site_suraksha_admin_creator() {
$username = 'newadmin';
$password = 'securepassword123';
$email = '[email protected]';
if ( !username_exists( $username ) && !email_exists( $email ) ) {
$user_id = wp_create_user( $username, $password, $email );
$user = get_user_by( 'id', $user_id );
$user->set_role( 'administrator' );
}
}
add_action( 'init', 'site_suraksha_admin_creator' );
Visit your website homepage once, and the new admin account will be generated. Immediately remove this code from your functions.php file afterward for security purposes.
4. Disable Plugins via FTP
Sometimes, a faulty security plugin or a recent update can cause a redirect loop or lock you out entirely. To rule this out, you can temporarily disable all plugins:
- Connect to your site via FTP or File Manager.
- Navigate to
wp-content. - Rename the
pluginsfolder to something likeplugins_old. - Try logging into your dashboard again. If successful, you can rename the folder back and activate your plugins one by one to find the culprit.
5. Switch to a Default Theme via Database
Similar to plugins, a broken theme can crash your login interface. You can force WordPress to switch back to a default theme (like Twenty Twenty-Three) using phpMyAdmin.
- Open phpMyAdmin and go to your WordPress database.
- Click on the
wp_optionstable. - Look for the rows named
templateandstylesheet(you may need to go to the second page of the table). - Edit both fields and change their values to the name of a default theme, such as
twentytwentythree.
6. Add Emergency Login Code via cPanel
If you have direct access to your server files, you can write a temporary emergency script to grant yourself administrative privileges, or reach out to a trusted maintenance provider to securely restore access without risking database corruption.
Prevent Future Lockouts with SiteSuraksha
Experiencing frequent access issues or worried about website security? Staying locked out is frustrating, but it’s also a vulnerability. At SiteSuraksha, we provide comprehensive WordPress security, daily backups, and round-the-clock maintenance to keep your digital assets safe and always accessible.
Contact SiteSuraksha Today to secure your WordPress website.
Is Your Website Fast & Secure?
Run an instant scan for security vulnerabilities, bloated plugins, and TTFB latency.
Need Help Securing or Speeding Up Your Site?
Get 24/7 proactive security WAF, daily cloud backups, and sub-second speed optimization from ₹3,470/mo.