Few things are as frustrating for a WordPress site owner as being unable to log into the admin dashboard. It can feel like coming home to find your keys don’t work. You panic, then get frustrated, and finally, you start looking for a solution.
If you’re here, you’re at the solution-seeking stage. The good news is that with a systematic approach, you can regain access. This guide outlines a linear, step-by-step troubleshooting process used by experienced developers. We’ll start with the simplest fixes and move to more advanced solutions.
Before You Begin: Consider a Backup
If you have a recent backup of your site from just before the login issue occurred, restoring it might be the quickest solution. Check your hosting control panel (like cPanel or a custom panel like BaoTa) or your backup plugin’s remote storage for a backup point. If you’re running a dynamic site (e.g., WooCommerce) and need to preserve recent data, proceed with the steps below after creating a fresh manual backup of your files and database via your host’s tools.
Step-by-Step Troubleshooting Guide
Follow these steps in order. Once you regain access, stop and secure your login.
1. Restore the Default Login URL
Problem: You see a message like “This has been disabled” or a 404 error at /wp-admin or /wp-login.php.
Cause: You or a security plugin changed the default login URL, and you’ve forgotten the new slug or the plugin is malfunctioning.
Solution: Temporarily disable the login URL-changing plugin via SFTP.
Connect to your site via SFTP.
Navigate to
/wp-content/plugins/.Find the folder of the login security plugin (e.g.,
wps-hide-login,perfmatters).Rename the folder (e.g., add
-disabledto the end).Try logging in at
https://www.wptroubleshoot.com/wp-admin.
2. Reset Your Admin Password via the Database
Problem: You get an “Invalid password” error, and the “Lost your password?” email never arrives.
Cause: WordPress email is not configured correctly, or the password reset link is being blocked.
Solution: Reset the password directly in the MySQL database using phpMyAdmin.
Access phpMyAdmin via your hosting control panel.
Select your WordPress database.
Find the
wp_userstable (note: your prefix may differ fromwp_).Click Browse, find your admin user, and click Edit.
In the
user_passfield, enter a new password.From the Function dropdown next to it, select MD5.
Click Go. You can now log in with the new password.
3. Create a New Administrator User
Problem: You can log in but lack administrator capabilities (can’t access Plugins, Themes, etc.).
Cause: Your user role was inadvertently changed, or your site was compromised.
Solution: Manually create a new admin user in the database.
In phpMyAdmin, select your WordPress database.
Go to the
wp_userstable and click Insert.Fill in the fields:
user_login,user_pass(with MD5 function),user_email, etc. Use a high, unique number forID.Click Go. Note the assigned
ID(e.g., 8).Go to the
wp_usermetatable and click Insert.Add the first row:
user_id= [the new ID],meta_key=wp_capabilities,meta_value=a:1:{s:13:"administrator";b:1;}.Add the second row:
user_id= [the new ID],meta_key=wp_user_level,meta_value=10.Log in with the new admin credentials.
4. Disable Security or Login Limiter Plugins
Problem: You are locked out after too many failed attempts, or you see a security-related blocking message.
Cause: A security plugin (e.g., Wordfence, iThemes Security) has locked your IP address or session.
Solution: Temporarily disable the security plugin via SFTP.
Connect via SFTP and go to
/wp-content/plugins/.Locate the folder of your security plugin.
Rename the folder (e.g., change
wordfencetowordfence-disabled).Try to log in again. Once in, you can rename the folder back and configure the plugin’s whitelist or lockout settings.
5. Resolve the White Screen of Death (WSoD)
Problem: You see a completely blank screen when trying to access /wp-admin.
Cause: Typically a fatal PHP error caused by a plugin or theme conflict, or insufficient memory.
Solution A: Disable All Plugins
Via SFTP, navigate to
/wp-content/.Rename the
pluginsfolder toplugins.disabled.Try to access
/wp-admin. If successful, rename the folder back topluginsand disable plugins one-by-one from the dashboard to identify the culprit.
Solution B: Increase PHP Memory Limit
Via SFTP, edit the
wp-config.phpfile in your site’s root directory.Add this line above
/* That's all, stop editing! Happy publishing. */:
define('WP_MEMORY_LIMIT', '256M');Save and upload the file. Try logging in again.
6. Fix Database Connection Errors
Problem: You see “Error Establishing a Database Connection.”
Cause: Incorrect database credentials in wp-config.php or database server issues.
Solution:
Via SFTP, edit the
wp-config.phpfile.Verify and correct the
DB_NAME,DB_USER,DB_PASSWORD, andDB_HOSTvalues with your hosting provider’s details.Save and upload the file.
If the error persists, contact your hosting provider to check the database server status.
7. Roll Back Recent Code Changes
Problem: You see a “Parse error: syntax error” message with a file path.
Cause: A recent edit to a core file (like functions.php), plugin file, or a pasted code snippet contains a syntax error.
Solution:
The error message will indicate the problematic file (e.g.,
/wp-content/themes/your-theme/functions.php).Via SFTP, navigate to and edit that file.
Revert the most recent changes you made. If unsure, compare with a backup or a fresh copy of the theme/plugin.
Save and upload the file. Your site should reload, allowing login.




